/*
 * 510Pens Website Styles
 *
 * This stylesheet defines the look and feel of the 510Pens e‑commerce site.
 * The design takes inspiration from the original 510Pens website (dark theme
 * with warm orange highlights) while adding modern touches such as a flexible
 * grid layout, larger typography and improved responsiveness.
 */

/* Reset margins and paddings for consistency across browsers */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Root variables for easy theme changes */
:root {
  --color-bg: #0f0f0f;         /* primary background colour */
  --color-surface: #171717;    /* card and section backgrounds */
  --color-primary: #ff6b35;    /* accent colour (orange) */
  --color-primary-light: #ffa865; /* lighter tint of orange */
  --color-secondary: #fafafa;  /* light text colour */
  --color-muted: #888;         /* muted text for descriptions */
  --border-radius: 0.5rem;     /* consistent rounding for cards */
  --transition-speed: 0.2s;    /* universal transition timing */
  --max-width: 1200px;         /* content max width */
  --header-height: 70px;       /* fixed header height */
}

body {
  font-family: 'Inter', Arial, sans-serif;
  background-color: var(--color-bg);
  color: var(--color-secondary);
  line-height: 1.6;
}

/* Global container centring */
.container {
  width: 90%;
  max-width: var(--max-width);
  margin: 0 auto;
}

/* Header styling */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: var(--color-surface);
  box-shadow: 0 2px 4px rgba(0,0,0,0.5);
  z-index: 1000;
}

header .nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

header .nav .logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--color-secondary);
}

header .nav .logo img {
  height: 50px;
  width: auto;
}

header .nav .menu {
  display: flex;
  gap: 1.5rem;
}

header .nav .menu a {
  color: var(--color-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-speed);
}

header .nav .menu a:hover {
  color: var(--color-primary);
}

/* Hero section styles */
.hero {
  padding-top: calc(var(--header-height) + 4rem);
  padding-bottom: 4rem;
  background-image: url('images/510every2.jpeg');
  background-size: cover;
  background-position: center;
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 0;
}

.hero .content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  padding: 0 1rem;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.hero p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  color: var(--color-muted);
}

.hero .btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  border-radius: var(--border-radius);
  background-color: var(--color-primary);
  color: var(--color-surface);
  text-decoration: none;
  font-weight: 600;
  transition: background-color var(--transition-speed);
}

.hero .btn:hover {
  background-color: var(--color-primary-light);
}

/* Category cards on home page */
.categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 3rem auto;
}

.category-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius);
  background-color: var(--color-surface);
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.4);
}

.category-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.category-card .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--color-secondary);
  padding: 1rem;
}

.category-card .overlay h3 {
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
}

.category-card .overlay p {
  font-size: 0.9rem;
  color: var(--color-muted);
}

.category-card .overlay .btn {
  margin-top: 1rem;
  font-size: 0.9rem;
  padding: 0.6rem 1.2rem;
}

/* Product grid for shop page */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin: 2rem auto;
}

.product-card {
  background-color: var(--color-surface);
  border-radius: var(--border-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.4);
}

.product-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.product-card .card-content {
  padding: 1rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.product-card h4 {
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}

.product-card .price {
  color: var(--color-primary);
  font-weight: bold;
}

.product-card .btn {
  margin-top: 1rem;
  align-self: flex-start;
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
}

/* Product detail page */
.product-detail {
  margin: 2rem auto;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.product-detail .images {
  flex: 1 1 350px;
}

.product-detail .images img {
  width: 100%;
  border-radius: var(--border-radius);
}

.product-detail .info {
  flex: 1 1 350px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.product-detail .info h2 {
  font-size: 2rem;
}

.product-detail .info .price {
  font-size: 1.5rem;
  color: var(--color-primary);
  font-weight: bold;
}

.product-detail .info ul {
  list-style: disc;
  margin-left: 1.2rem;
}

.product-detail .info li {
  margin-bottom: 0.5rem;
}

.product-detail .info .buy-section {
  margin-top: 1rem;
}

.product-detail .info .buy-section .btn {
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
}

/* Cross‑sell section */
.related-products {
  margin-top: 3rem;
}

.related-products h3 {
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

.related-products .product-grid {
  margin-top: 1rem;
}

/* About and contact pages */
.about,
.contact {
  margin: 2rem auto;
  max-width: 800px;
  background-color: var(--color-surface);
  padding: 2rem;
  border-radius: var(--border-radius);
}

.about h2,
.contact h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--color-primary);
}

.about p {
  margin-bottom: 1rem;
  color: var(--color-muted);
}

.contact form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact label {
  font-weight: 500;
}

.contact input,
.contact textarea {
  padding: 0.6rem;
  border: none;
  border-radius: var(--border-radius);
  background-color: #222;
  color: var(--color-secondary);
  font-size: 1rem;
}

.contact textarea {
  resize: vertical;
  min-height: 120px;
}

.contact .btn {
  width: fit-content;
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
}

/* Footer */
footer {
  margin-top: 4rem;
  background-color: var(--color-surface);
  padding: 2rem 0;
}

footer .footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

footer .footer-content p {
  color: var(--color-muted);
  font-size: 0.9rem;
}

footer .footer-content .socials {
  display: flex;
  gap: 1rem;
}

footer .footer-content .socials a {
  color: var(--color-primary);
  font-size: 1.2rem;
  transition: color var(--transition-speed);
}

footer .footer-content .socials a:hover {
  color: var(--color-primary-light);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }
  .hero p {
    font-size: 0.95rem;
  }
  .product-detail {
    flex-direction: column;
  }
}

/* Featured products on home page */
.featured-products {
  margin: 4rem auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.featured-card {
  background-color: var(--color-surface);
  border-radius: var(--border-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.featured-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.4);
}

.featured-card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.featured-card .content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.featured-card h4 {
  font-size: 1.3rem;
}

.featured-card p {
  font-size: 0.95rem;
  color: var(--color-muted);
}

.featured-card .price {
  color: var(--color-primary);
  font-weight: bold;
}

.featured-card .btn {
  margin-top: 0.8rem;
  width: fit-content;
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
}