/* ======================================
   AUTO PARTS WEBSITE
   style.css
====================================== */

/* Google Font */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');


    body {
      margin: 0;
      font-family: Arial, sans-serif;
    }

    header {
      background-color: #333;
      color: white;
      padding: 1px;
      text-align: center;
    }

    img {
    max-width: 70%;
    max-height: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
    }
    form {
      background: #fff;
      padding: 20px 30px;
      border-radius: 8px;
      box-shadow: 0 0 10px rgba(0,0,0,0.1);
      width: 85%;
    }
    label {
      display: block;
      margin-bottom: 5px;
      font-weight: bold;
    }
    input, select, textarea {
      width: 100%;
      padding: 8px;
      margin-bottom: 15px;
      border: 1px solid #ccc;
      border-radius: 4px;
    }
    button {
      background: #007BFF;
      color: #fff;
      border: none;
      padding: 10px 15px;
      border-radius: 4px;
      cursor: pointer;
    }
    button:hover {
      background: #0056b3;
    }

    h4 {
       text-align: center;
    }


/* ==========================
   Variables
========================== */

:root{

    --primary:#00a8d2;
    --secondary:#00a8d2;
    --accent:#b30010;

    --white:#ffffff;
    --light:#f4f6f8;
    --grey:#666666;
    --dark:#1f1f1f;

    --shadow:0 8px 25px rgba(0,0,0,.15);

    --radius:10px;

    --transition:.3s ease;
}

/* ==========================
   Reset
========================== */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

body{
    font-family:'Roboto',sans-serif;
    background:var(--light);
    color:var(--dark);
    line-height:1.6;
}

/* ==========================
   Global
========================== */

.container{
    width:90%;
    max-width:1300px;
    margin:auto;
}

img{
    width:100%;
    display:block;
}

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

section{
    padding:80px 0;
}

h1,h2,h3{
    margin-bottom:20px;
}

p{
    margin-bottom:15px;
}

/* ==========================
   Header
========================== */

header{
    background:var(--primary);
    top:0;
    z-index:999;
    box-shadow:var(--shadow);
}

nav{
    display:flex;
    justify-content:space-between;
    align-items:center;
    height:80px;
}

.logo{
    display: flex;
    align-items: center; /* centers the image and text vertically */
    gap: 12px;           /* adds a clean space between the logo and text */
    font-size:2rem;
    font-weight:700;
    color:white;
}

.logo img {
    height: 40px;        /* Keeps resized height */
    width: auto;
}

.logo span{
    color:var(--accent);
}

.menu{
    display:flex;
    list-style:none;
    gap:35px;
}

.menu a{
    color:white;
    transition:var(--transition);
    font-weight:500;
}

.menu a:hover{
    color:var(--accent);
}

/* ==========================
   Buttons
========================== */

.btn{
    display:inline-block;
    background:var(--accent);
    color:white;
    padding:14px 30px;
    border-radius:var(--radius);
    transition:var(--transition);
    font-weight:bold;
}

.btn:hover{
    transform:translateY(-3px);
    background:#cb1a2a;
}

.btn-secondary{
    background:transparent;
    border:2px solid white;
}

.btn-secondary:hover{
    background:white;
    color:var(--primary);
}

/* ==========================
   main
========================== */

.main{

    min-height:30vh;
    display:flex;
    align-items:center;
    position:relative;
}

.main::before{
    content:"";
    position:absolute;
    inset:0;
    background:rgba(0,0,0,.60);
}

.main-content{
    position:relative;
    color:white;
    max-width:700px;
}

.main h1{
    font-size:4rem;
    line-height:1.1;
    margin-bottom:25px;
}

.main p{
    font-size:1.3rem;
    margin-bottom:35px;
}

/* ==========================
   Section Titles
========================== */

.title{
    text-align:center;
    margin-bottom:50px;
}

.title h2{
    font-size:2.5rem;
    color:var(--primary);
}

.title p{
    color:var(--grey);
}

/* ==========================
   Cards
========================== */

.grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
    gap:30px;
}

.card{
    background:white;
    border-radius:var(--radius);
    overflow:hidden;
    box-shadow:var(--shadow);
    transition:var(--transition);
}

.card:hover{
    transform:translateY(-8px);
}

.card img{
    height:220px;
    object-fit:cover;
}

.card-content{
    padding:25px;
}

.card h3{
    color:var(--primary);
}

.price{
    font-size:1.5rem;
    color:var(--accent);
    font-weight:bold;
    margin:15px 0;
}

/* ==========================
   Categories
========================== */

.category{
    background:white;
    padding:30px;
    text-align:center;
    border-radius:var(--radius);
    box-shadow:var(--shadow);
    transition:var(--transition);
}

.category:hover{
    background:var(--primary);
    color:white;
}

/* ==========================
   Forms
========================== */

form{
    display:grid;
    gap:20px;
}

input,
textarea,
select{
    padding:15px;
    border:1px solid #ccc;
    border-radius:var(--radius);
    font-size:1rem;
    outline:none;
}

input:focus,
textarea:focus{
    border-color:var(--accent);
}

textarea{
    min-height:180px;
    resize:vertical;
}

/* ==========================
   Contact
========================== */

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

/* ==========================
   Footer
========================== */

footer{
    background:var(--primary);
    color:white;
    padding:60px 0 20px;
}

.footer-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
    gap:40px;
}

footer h3{
    color:var(--accent);
}

footer ul{
    list-style:none;
}

footer li{
    margin:12px 0;
}

footer a:hover{
    color:var(--accent);
}

.fab {
  position: fixed;
  bottom: 20px;
  right: 30%;
}

.fab-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: url(/assets/images/top.png);
  border-radius: 50%;
  background-repeat: no-repeat;
  background-color: #b30010;
  background-size: 55px;
  background-position: center;
  color: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}
.fab-button img{
    width: 30px;
}

.fab-button:hover {
  background-color: #72010c;
}

.copyright{
    margin-top:40px;
    text-align:center;
    border-top:1px solid rgba(255,255,255,.2);
    padding-top:20px;
}

/* ==========================
   Responsive
========================== */

@media(max-width:900px){

.main h1{
    font-size:2.8rem;
}

.contact{
    grid-template-columns:1fr;
}

nav{
    flex-direction:column;
    height:auto;
    padding:20px;
}

.menu{
    flex-direction:column;
    margin-top:20px;
    text-align:center;
}

}

@media(max-width:600px){

.main h1{
    font-size:2.2rem;
}

.main p{
    font-size:1rem;
}

.btn{
    width:100%;
    text-align:center;
}

}
/* ==========================================
   PRODUCT PAGE
========================================== */

.product-page{
    padding:60px 0;
}

.product-details{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:50px;
    align-items:start;
}

.product-image img{
    width:100%;
    border-radius:10px;
    border:1px solid #ddd;
}

.product-info h1{
    margin-bottom:20px;
}

.product-info p{
    margin-bottom:15px;
}

.product-info .price{
    margin:25px 0;
}

@media(max-width:900px){

.product-details{

grid-template-columns:1fr;

}

}
