/* static/style.css */

/* ---------- Google Font & Global Styles ---------- */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap");

:root {
  --primary-color: #007185; /* Amazon Teal */
  --secondary-color: #232f3e; /* Amazon Navy */
  --accent-color: #ff9900; /* Amazon Orange */
  --background-color: #eaeded;
  --text-color: #111;
  --card-background: #ffffff;
  --border-radius: 8px;
  --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --transition-speed: 0.3s ease;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: var(--background-color);
  margin: 0;
  color: var(--text-color);
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

main {
  max-width: 1300px;
  margin: 20px auto;
  padding: 0 20px;
}

/* ---------- Header ---------- */
header {
  background: var(--card-background);
  text-align: center;
  padding: 30px 20px;
  margin-bottom: 30px;
  border-bottom: 1px solid #ddd;
}

header h1 {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  color: var(--secondary-color);
}

header p {
  margin: 5px 0 0;
  color: #555;
  font-size: 16px;
}

/* ---------- Product Grid ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 30px;
}

.product-card {
  background: var(--card-background);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-speed),
    box-shadow var(--transition-speed);
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.product-card a {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-bottom: 1px solid #eee;
}

.product-card h3 {
  padding: 15px;
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  flex-grow: 1; /* Ensures footer of card aligns */
  text-align: center;
  color: #333;
}

/* ---------- Product Details Page ---------- */
.product-details-container {
  background: var(--card-background);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 40px;
  margin-bottom: 40px;
}

.product-details {
  display: flex;
  gap: 50px;
}

.product-image-wrapper {
  flex: 1 1 400px;
}

.product-image-wrapper img {
  width: 100%;
  max-width: 400px;
  border-radius: var(--border-radius);
  height: auto;
}

.product-info {
  flex: 1 1 600px;
}

.product-info h2 {
  font-size: 36px;
  font-weight: 700;
  margin: 0 0 10px 0;
}

.product-info .price {
  font-size: 28px;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.product-info .description {
  font-size: 16px;
  color: #444;
  margin-bottom: 30px;
}

.add-to-cart-btn {
  display: inline-block;
  padding: 14px 30px;
  background-color: var(--accent-color);
  color: var(--text-color);
  font-weight: 600;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color var(--transition-speed);
}

.add-to-cart-btn:hover {
  background-color: #e68a00;
}

.back-btn {
  display: inline-block;
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 20px;
  transition: opacity var(--transition-speed);
}

.back-btn:hover {
  opacity: 0.8;
}

/* ---------- Recommendations Section ---------- */
.recommendations h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--secondary-color);
  text-align: center;
  margin-bottom: 30px;
}
/* static/style.css */
/* ... (keep all the previous CSS) ... */

/* ---------- Navbar Styles ---------- */
.navbar {
  background-color: var(--secondary-color);
  padding: 15px 30px;
  color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-container {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  font-size: 24px;
  font-weight: 700;
  color: white;
}
.nav-brand:hover {
  color: var(--accent-color);
}

.nav-search {
  display: flex;
  flex-grow: 1;
  margin: 0 40px;
  max-width: 600px;
}

.nav-search input {
  width: 100%;
  padding: 10px 15px;
  border: none;
  border-radius: 5px 0 0 5px;
  font-size: 16px;
}

.nav-search button {
  padding: 10px 15px;
  border: none;
  background-color: var(--accent-color);
  color: var(--secondary-color);
  cursor: pointer;
  border-radius: 0 5px 5px 0;
  font-size: 16px;
}

.nav-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 25px;
}

.nav-links a {
  color: white;
  font-weight: 600;
  font-size: 16px;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--accent-color);
}

/* ---------- Footer Styles ---------- */
.site-footer {
  background-color: var(--secondary-color);
  color: #ddd;
  padding: 50px 0 0 0;
  margin-top: 50px;
  font-size: 15px;
}

.footer-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.footer-col h4 {
  font-size: 18px;
  font-weight: 700;
  color: white;
  margin-bottom: 20px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
}

.footer-col ul li {
  margin-bottom: 12px;
}

.footer-col a {
  color: #ccc;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--accent-color);
  text-decoration: underline;
}

.footer-social a {
  display: inline-block;
  width: 40px;
  height: 40px;
  line-height: 40px;
  text-align: center;
  border-radius: 50%;
  background: #4a5a6d;
  color: white;
  margin-right: 10px;
  transition: background-color 0.2s;
}

.footer-social a:hover {
  background-color: var(--primary-color);
}

.footer-bottom {
  text-align: center;
  padding: 20px 0;
  border-top: 1px solid #4a5a6d;
  font-size: 14px;
  color: #aaa;
}

/* ---------- Responsive Adjustments for Navbar/Footer ---------- */
@media (max-width: 900px) {
  .nav-search {
    display: none; /* Hide search bar on smaller screens for simplicity */
  }
  .footer-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}
@media (max-width: 768px) {
  .nav-links {
    display: none; /* Hide links for a mobile menu later */
  }
  .nav-container {
    justify-content: center;
  }
}
