/* --- Modernized CSS Variables --- */
:root {
    --primary-color: #0c1c2b; /* A deep, rich navy blue */
    --secondary-color: #2e75e1; /* A dynamic, slightly more saturated blue */
    --accent-color: #b0c4de; /* A soft, calming light blue for details */
    --background-light: #f5f8fa; /* A clean, very light gray-blue background */
    --background-dark: #162638; /* A very dark, almost black blue for footers */
    --text-dark: #222222;
    --text-light: #ffffff;
    --border-color: #e5e5e5;
    --shadow-subtle: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-medium: 0 8px 20px rgba(0, 0, 0, 0.08);
    --shadow-elevated: 0 12px 30px rgba(0, 0, 0, 0.12);
    --font-family-primary: 'Poppins', sans-serif;
}

body {
    font-family: var(--font-family-primary);
    margin: 0;
    padding: 0;
    line-height: 1.7; /* Increased for better readability */
    color: var(--text-dark);
    background-color: var(--background-light);
    scroll-behavior: smooth;
    overflow-x: hidden;
    font-size: 1rem;
}

.container {
    width: 90%;
    max-width: 1280px; /* Slightly wider container for more space */
    margin: auto;
    padding: 0;
}

/* --- Header & Navigation --- */
header {
    background: var(--text-light);
    padding: 1rem 0;
    box-shadow: none; /* No shadow initially */
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: box-shadow 0.3s ease, padding 0.3s ease, transform 0.3s ease-in-out;
}

.scrolled-header {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 0.75rem 0; /* Shrinks on scroll */
}

.logo img {
    max-width: 280px;
    height: auto;
    transition: transform 0.3s ease;
}

.logo img:hover {
    transform: scale(1.02);
}

.header-hidden {
    transform: translateY(-100%);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    max-width: 1280px;
    margin: auto;
}

.nav-links {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    position: relative;
    transition: color 0.3s ease, transform 0.2s ease, opacity 0.2s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover, .nav-links a:focus {
    color: var(--secondary-color);
    transform: translateY(-2px);
}

.nav-links a:hover::after, .nav-links a:focus::after {
    width: 100%;
}

#cart-button {
  background: none;
  border: none;
  color: var(--primary-color); 
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.3s ease, transform 0.2s ease;
}

#cart-button:hover {
  color: var(--secondary-color); 
  transform: translateY(-2px);
}

/* --- Hero Section with Slideshow --- */
.hero {
    position: relative;
    height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--text-light);
    overflow: hidden;
    box-shadow: inset 0 -15px 25px rgba(0,0,0,0.3);
}

/* Slideshow Container */
.slideshow-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.mySlides {
    display: none;
    width: 100%;
    height: 100%;
}

.mySlides img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(50%);
}

/* Add a fade animation to the slides */
.fade {
  animation-name: fade;
  animation-duration: 1.5s;
}

@keyframes fade {
  from {opacity: .4}
  to {opacity: 1}
}

/* Hero Content Overlay */
.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInSlideUp 1s ease-out 0.5s forwards;
}

@keyframes fadeInSlideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content h1 {
    font-size: 4.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: -2px;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.hero-content p {
    font-size: 1.6rem;
    font-weight: 300;
    margin-bottom: 3rem;
}

.cta-button {
    display: inline-block;
    padding: 18px 45px;
    background: var(--secondary-color);
    color: var(--text-light);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-medium);
}

.cta-button:hover {
    background: #1f50a8;
    transform: translateY(-5px);
    box-shadow: var(--shadow-elevated);
}

/* --- General Section Styles --- */
section {
    padding: 6rem 0;
    text-align: center;
}

h2 {
    font-size: 3.5rem;
    margin-bottom: 3.5rem;
    color: var(--primary-color);
    position: relative;
    display: inline-block;
    font-weight: 700;
    letter-spacing: -1px;
}

h2::after {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    background: linear-gradient(to right, var(--secondary-color), var(--accent-color));
    margin: 15px auto 0;
    border-radius: 2px;
    transform: skewX(-20deg);
}

/* --- Product Grid --- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3.5rem;
  width: 90%;
  max-width: 1280px;
  margin: auto;
}

.product-card {
  background: var(--text-light);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow-medium);
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  overflow: hidden;
  text-align: center;
}

.product-card:hover {
  transform: translateY(-15px);
  box-shadow: var(--shadow-elevated);
}

.product-card img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin-bottom: 2rem;
  transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.product-card:hover img {
  transform: scale(1.08);
}

.product-card h3 {
  margin: 0.5rem 0;
  font-size: 2rem;
  color: var(--primary-color);
  font-weight: 600;
  letter-spacing: -1px;
}

.product-card .price {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--secondary-color);
  display: block;
  margin: 1.5rem 0;
}

.add-to-cart {
  background: var(--primary-color);
  color: var(--text-light);
  border: none;
  padding: 14px 32px;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  box-shadow: var(--shadow-subtle);
}

.add-to-cart:hover {
  background: var(--secondary-color);
  transform: scale(1.05);
  box-shadow: var(--shadow-medium);
}

/* --- Testimonials Section --- */
.testimonials {
    background: var(--background-light);
    padding: 6rem 0;
    text-align: center;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3rem;
    width: 90%;
    max-width: 1280px;
    margin: 0 auto;
}

.testimonial-card {
    background: var(--text-light);
    padding: 3rem;
    border-radius: 16px;
    box-shadow: var(--shadow-medium);
    text-align: left;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.testimonial-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-elevated);
}

.testimonial-card p {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #444;
    margin-bottom: 2rem;
    font-style: italic;
}

.customer-info {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

.customer-name {
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--primary-color);
    display: block;
}

.customer-location {
    font-weight: 400;
    color: #888;
    font-size: 1rem;
}

/* --- Footer --- */
footer {
    background: var(--background-dark);
    color: var(--accent-color);
    text-align: center;
    padding: 3rem 0;
    font-size: 0.95rem;
}

footer p a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

footer p a:hover {
    text-decoration: underline;
    color: var(--text-light);
}

/* --- Updated Cart Styles --- */
.cart {
  position: fixed;
  top: 0;
  right: -350px;
  width: 350px;
  height: 100%;
  background-color: var(--background-light);
  border-left: 2px solid var(--secondary-color);
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  padding: 30px;
  box-sizing: border-box;
  z-index: 1000;
}

.cart.visible {
  right: 0;
}

.cart h3 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 1rem;
}

.cart ul {
  list-style: none;
  padding: 0;
}

.cart li {
  padding: 15px 0;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-dark);
}

.cart li:last-child {
  border-bottom: none;
}

.cart li button {
  background-color: #e74c3c;
  color: var(--text-light);
  border: none;
  padding: 6px 12px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.cart li button:hover {
  background-color: #c0392b;
}

.cart-total {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--accent-color);
    font-weight: 600;
}

#cart-container p {
    text-align: center;
    font-style: italic;
    color: #888;
}

/* --- RESPONSIVE DESIGN STYLES --- */
@media (max-width: 992px) {
    .nav-links li {
        margin-left: 1.5rem;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: center;
    }
    
    .logo {
        margin-bottom: 1.5rem;
    }
    
    .nav-links {
        justify-content: center;
        width: 100%;
    }

    .nav-links li {
        margin: 0 0.8rem;
    }

    .hero {
        height: 65vh;
    }

    .hero-content h1 {
        font-size: 3rem;
        letter-spacing: 0;
    }

    .hero-content p {
        font-size: 1.3rem;
    }

    h2 {
        font-size: 2.8rem;
        margin-bottom: 2.5rem;
    }

    .product-grid, .testimonial-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    section {
        padding: 4rem 0;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2.2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .cta-button {
        padding: 14px 30px;
        font-size: 0.9rem;
    }
}

