/* --- Global Styles --- */
:root {
  /* Color Scheme */
  --earthy-brown: #8B4513;
  --warm-beige: #F5F5DC;
  --terracotta: #E2725B;
  --muted-teal: #008080;
  --light-grey: #f4f4f4;
  --dark-grey: #333;
  --white: #fff;

  /* Updated Font Variables to match the HTML links */
  --heading-font: 'Playfair Display', serif; /* Corrected to serif as it's a serif font */
  --body-font: 'Poppins', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--body-font);
  line-height: 1.6;
  /* NEW: Body background image */
  background-image: url('images/macrame wallpaper.jpg');
  background-attachment: fixed;
  background-size: cover;
  /* Keep the fallback color */
  background-color: var(--light-grey);
  color: var(--dark-grey);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

h1, h2, h3 {
  font-family: var(--heading-font);
  font-weight: 700;
  color: var(--terracotta);
}

a {
  text-decoration: none;
  color: var(--muted-teal);
  transition: color 0.3s ease;
}

a:hover {
  color: var(--earthy-brown);
}

.cta-button {
  display: inline-block;
  background-color: var(--muted-teal);
  color: var(--white);
  padding: 10px 20px;
  border-radius: 5px;
  text-transform: uppercase;
  font-weight: bold;
}

.cta-button:hover {
  background-color: var(--terracotta);
  color: var(--white);
}

/* --- Header --- */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5%;
  background-color: var(--white);
  border-bottom: 1px solid var(--light-grey);
}

.logo img {
  width: 150px;
  height: auto;
  margin: 0;
}

.main-nav {
  flex-grow: 1;
  text-align: center;
}

.main-nav .nav-links {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.main-nav a {
  color: var(--earthy-brown);
  font-weight: 500;
}

.user-actions {
  display: flex;
  gap: 1rem;
}

.user-actions a {
  font-size: 1.25rem;
  color: var(--earthy-brown);
}

.mobile-menu-toggle {
  display: none; /* Hidden on desktop */
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--muted-teal);
}

/* --- Hero Section --- */
.hero-section {
  background-image: url('../images/macrame wallpaper.jpg'); /* Corrected path assumption */
  background-size: cover;
  background-position: center;
  height: 80vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: var(--white);
  position: relative;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 0 1rem;
}

.hero-content h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  color: var(--white);
  margin-bottom: 1rem;
}

.hero-content p {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  margin-bottom: 2rem;
}

/* --- Featured Products & Categories Showcase --- */
.featured-products, .category-showcase {
  padding: 4rem 2rem;
  text-align: center;
}

.featured-products h2, .category-showcase h2 {
  margin-bottom: 2rem;
}

.product-grid, .category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.product-card {
  background-color: var(--white);
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  padding: 1rem;
  text-align: center;
  transition: transform 0.3s ease;
}

.product-card:hover {
  transform: translateY(-5px);
}

.product-card img {
  max-width: 100%;
  border-radius: 6px;
  margin-bottom: 1rem;
  /* **PRODUCT IMAGE RESIZING** */
  height: 250px; 
  width: 100%;
  object-fit: cover;
}

.product-card h3 {
  color: var(--earthy-brown);
  font-size: 1.2rem;
}

.product-card .price {
  font-weight: bold;
  color: var(--muted-teal);
  margin-bottom: 1rem;
}

.add-to-cart-btn {
  background-color: var(--terracotta);
  color: var(--white);
  padding: 8px 16px;
  border-radius: 5px;
  font-size: 0.9rem;
}

.add-to-cart-btn:hover {
  background-color: var(--earthy-brown);
}

/* --- Categories Showcase --- */
.category-card {
  background-color: var(--terracotta);
  color: var(--white);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background-color 0.3s ease;
}

.category-card:hover {
  background-color: var(--earthy-brown);
}

.category-card h3 {
  color: var(--white);
}

/* ------------------------------------- */
/* --- AUXILIARY PAGE STYLES (ABOUT, CONTACT, BLOG) --- */
/* ------------------------------------- */

/* --- General Page Headers (Reused for About/Contact/Blog) --- */

.about-title {
    color: var(--earthy-brown); 
    font-size: clamp(2rem, 4vw, 3.5rem);
    margin-bottom: 1rem;
}

.lead-text {
    font-size: 1.25rem;
    color: var(--muted-teal);
    max-width: 800px;
    margin: 0 auto;
}

.section-heading {
    margin-bottom: 2rem;
    color: var(--terracotta);
    text-align: center;
}

/* --- 1. About Page Styles --- */

.about-hero {
    background-color: var(--white);
    padding: 6rem 0;
    text-align: center;
}

.mission-section {
    padding: 4rem 0;
    background-color: var(--warm-beige);
}

.mission-content {
    max-width: 900px;
    margin: 0 auto;
    font-size: 1.1rem;
}

.mission-content p {
    margin-bottom: 1.5rem;
}

.value-pillars {
    padding: 4rem 0;
    text-align: center;
}

.pillars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.pillar-card {
    background-color: var(--light-grey);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.pillar-card h3 {
    color: var(--earthy-brown);
    margin-bottom: 1rem;
    font-family: var(--heading-font);
}

.team-cta {
    padding: 4rem 0;
    text-align: center;
    background-color: var(--terracotta);
    color: var(--white);
}

.team-cta h2, .team-cta p {
    color: var(--white);
    margin-bottom: 1.5rem;
}

/* --- 2. Contact Page Styles --- */

.contact-hero {
    background-color: var(--warm-beige);
    padding: 4rem 0 3rem;
    text-align: center;
}

.contact-details-and-form {
    padding: 4rem 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    align-items: start;
}

.contact-info {
    padding: 2rem;
    background-color: var(--light-grey);
    border-radius: 8px;
}

.contact-info h2 {
    margin-bottom: 2rem;
    color: var(--earthy-brown);
}

.info-group {
    margin-bottom: 1.5rem;
}

.info-group strong {
    color: var(--muted-teal);
    font-weight: 700;
}

.contact-form h2 {
    margin-bottom: 2rem;
    color: var(--terracotta);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--dark-grey);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: var(--body-font);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--muted-teal);
    outline: none;
}

/* --- 3. Blog Page Styles --- */

.blog-hero {
    background-color: var(--light-grey);
    padding: 4rem 0 3rem;
    text-align: center;
}

.blog-content {
    padding: 4rem 0;
}

.blog-grid-layout {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 3rem;
    align-items: start;
}

.featured-post {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    background-color: var(--warm-beige);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.featured-post img {
    width: 40%;
    height: auto;
    object-fit: cover;
}

.featured-post .post-text {
    padding: 2rem;
}

.featured-post h2 {
    color: var(--earthy-brown);
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

.post-category {
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--muted-teal);
    text-transform: uppercase;
}

.read-more-link {
    display: inline-block;
    margin-top: 1rem;
    color: var(--terracotta);
}
.read-more-link:hover {
    color: var(--muted-teal);
}

.post-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.post-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.post-card h3 {
    font-size: 1.15rem;
    color: var(--earthy-brown);
    margin-bottom: 0.5rem;
}

.post-meta {
    font-size: 0.9rem;
    color: #666;
}

.sidebar-widget {
    margin-bottom: 3rem;
    padding: 1.5rem;
    background-color: var(--warm-beige);
    border-radius: 8px;
}

.sidebar-widget h3 {
    font-size: 1.4rem;
    color: var(--terracotta);
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--terracotta);
    padding-bottom: 5px;
}

.sidebar-widget ul {
    list-style: none;
}

.sidebar-widget li a {
    color: var(--dark-grey);
    padding: 0.25rem 0;
    display: block;
}

.sidebar-widget input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.subscribe-button {
    width: 100%;
    text-align: center;
}

.pagination {
    text-align: center;
    margin-top: 3rem;
}
.pagination a {
    display: inline-block;
    padding: 8px 15px;
    margin: 0 5px;
    border: 1px solid var(--muted-teal);
    border-radius: 5px;
    color: var(--muted-teal);
}
.pagination a:hover, .pagination .current-page {
    background-color: var(--muted-teal);
    color: var(--white);
}

/* --- Footer --- */
.main-footer {
  background-color: var(--earthy-brown);
  color: var(--warm-beige);
  padding: 2rem;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-logo {
  font-family: var(--heading-font);
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--white);
}

.footer-links h4, .footer-social h4 {
  color: var(--white);
  margin-bottom: 1rem;
}

.footer-links ul {
  list-style: none;
}

.footer-links a, .footer-social a {
  color: var(--warm-beige);
  display: block;
  margin-bottom: 0.5rem;
}

.footer-social a {
  margin-right: 1rem;
  display: inline-block;
}

.copyright {
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1rem;
}

/* ------------------------------------- */
/* --- CATALOG / SHOP PAGE STYLES --- */
/* ------------------------------------- */

.catalog-hero {
    padding: 3rem 0;
    text-align: center;
    background-color: var(--warm-beige); /* Light header for the shop */
}

.catalog-main-content {
    padding: 4rem 2rem;
}

.catalog-grid-layout {
    /* Creates the two-column structure */
    display: grid;
    grid-template-columns: 250px 1fr; /* Fixed width sidebar and flexible product area */
    gap: 3rem;
    align-items: start;
}

.catalog-sidebar {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    position: sticky; /* Keep sidebar visible while scrolling */
    top: 20px;
}

.filter-widget {
    margin-bottom: 2rem;
}

.filter-widget h3 {
    font-size: 1.2rem;
    color: var(--earthy-brown);
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--light-grey);
    padding-bottom: 5px;
}

.category-filter-list {
    list-style: none;
}

.category-filter-list a {
    display: block;
    padding: 0.5rem 0;
    color: var(--dark-grey);
    transition: color 0.2s;
}

.category-filter-list a:hover,
.category-filter-list .filter-active {
    color: var(--muted-teal);
    font-weight: 500;
}

.price-slider {
    width: 100%;
}

.color-options label {
    display: block;
    margin-bottom: 0.5rem;
}

.sort-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--light-grey);
}

.sort-bar select {
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

/* Reusing the existing .product-grid and .product-card styles */

/* Responsive adjustments for Catalog */
@media (max-width: 900px) {
    .catalog-grid-layout {
        /* Stack the sidebar above the products on smaller screens */
        grid-template-columns: 1fr; 
    }
    
    .catalog-sidebar {
        position: static; /* Remove sticky on mobile */
    }
}

/* ------------------------------------- */
/* --- Responsive Design (Mobile) --- */
/* ------------------------------------- */

@media (max-width: 900px) {
    /* Contact Page Mobile */
    .contact-grid {
        grid-template-columns: 1fr; /* Stack columns */
        gap: 2rem;
    }

    /* Blog Page Mobile */
    .blog-grid-layout {
        grid-template-columns: 1fr; /* Stack main content and sidebar */
    }
    
    .featured-post {
        flex-direction: column;
    }
    
    .featured-post img {
        width: 100%; /* Image takes full width when stacked */
        max-height: 250px;
    }
}

@media (max-width: 768px) {

  .main-header {
    padding: 1rem 2rem;
  }

  /* Hide the main navigation links by default on small screens */
  .main-nav {
    display: none;
    position: absolute; /* Allows menu to slide down/overlay content */
    top: 60px; /* Adjust based on header height */
    left: 0;
    width: 100%;
    background-color: var(--white);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 100;
  }

  /* **NEW: Class to be toggled by JS to show the mobile menu** */
  .main-nav.active {
    display: block;
  }

  .main-nav .nav-links {
    flex-direction: column;
    align-items: center;
    padding: 1rem 0;
  }

  .main-nav a {
    padding: 0.75rem 0;
    display: block;
    width: 100%;
    text-align: center;
  }

  /* Display the mobile toggle button */
  .mobile-menu-toggle {
    display: block;
    order: 3; /* Push to the end of the flex container */
  }

  .user-actions {
    order: 2;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-links, .footer-social {
    width: 100%;
  }

  .footer-social ul {
    display: flex;
    justify-content: center;
    gap: 1rem;
  }

  .footer-links a {
    display: block;
    padding: 0.25rem 0;
  }
}