@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&family=Lato:wght@400;700&display=swap');

:root {
  --primary-color: #5f0f40; /* Imperial Purple */
  --secondary-color: #9a031e; /* Roman Red */
  --accent-color: #fb8b24; /* Gold */
  --background-color: #f5f5f5; /* Marble White */
  --text-color: #373737; /* Charcoal */
  --font-heading: 'Cinzel', serif;
  --font-body: 'Lato', sans-serif;
}

/* --- Global Resets & Base Styles --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
}

/* --- Typography --- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  text-transform: uppercase;
  color: var(--primary-color);
  margin-bottom: 0.75rem;
  font-weight: 700;
}

p {
  margin-bottom: 1rem;
}

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

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

/* --- Layout --- */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* --- Header & Navigation --- */
.main-header {
  background-color: #fff;
  padding: 1rem 5%;
  border-bottom: 2px solid var(--primary-color);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.logo a {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-color);
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.main-nav a {
  font-family: var(--font-heading);
  text-transform: uppercase;
  font-weight: 400;
  color: var(--text-color);
  padding-bottom: 0.25rem;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--accent-color);
  border-bottom: 2px solid var(--accent-color);
}

.header-actions {
  position: relative;
}

.cart-icon {
  font-size: 1.5rem;
  color: var(--text-color);
  position: relative;
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -12px;
  background-color: var(--secondary-color);
  color: #fff;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.nav-toggle {
  display: none;
  cursor: pointer;
  background: none;
  border: none;
  font-size: 2rem;
  z-index: 1001; /* Above nav menu */
}

/* --- Hero Section --- */
.hero {
  background-color: var(--text-color);
  background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5));
  /* background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('assets/images/marble-texture.jpg'); */
  background-size: cover;
  background-position: center;
  color: var(--background-color);
  text-align: center;
  padding: 6rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: #fff;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

.hero p {
  font-size: 1.2rem;
  max-width: 600px;
  margin: 1rem auto 2rem;
}

.cta-button {
  display: inline-block;
  background-color: var(--accent-color);
  color: #fff;
  padding: 0.8rem 2rem;
  font-family: var(--font-heading);
  text-transform: uppercase;
  font-weight: 700;
  border-radius: 4px;
  border: 2px solid var(--accent-color);
  transition: all 0.3s ease;
}

.cta-button:hover {
  background-color: transparent;
  color: var(--accent-color);
}

/* --- Product Grid --- */
.product-section {
  padding: 4rem 0;
}

.product-section h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
}

.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

/* --- Product Card --- */
.product-card {
  background-color: #fff;
  border: 1px solid #ddd;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(55, 55, 55, 0.15);
}

.product-card img {
  max-width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.product-info {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.product-info h3 {
  font-size: 1.2rem;
  color: var(--text-color);
  flex-grow: 1;
}

.price {
  color: var(--secondary-color);
  font-weight: 700;
  font-size: 1.1rem;
}

.product-card .add-to-cart-btn {
  background-color: var(--primary-color);
  color: #fff;
  padding: 0.75rem;
  border: none;
  cursor: pointer;
  font-family: var(--font-heading);
  text-transform: uppercase;
  margin-top: 1rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.product-card:hover .add-to-cart-btn {
  opacity: 1;
  transform: translateY(0);
}

/* --- Mini Cart --- */
.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cart-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mini-cart {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 400px;
  height: 100%;
  background-color: #fff;
  z-index: 1002;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.mini-cart.active {
  transform: translateX(0);
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
}

.mini-cart h3 {
  padding: 1.5rem;
  border-bottom: 1px solid #eee;
}

.mini-cart-items {
  flex-grow: 1;
  overflow-y: auto;
  padding: 1rem;
}

.cart-empty-msg {
  text-align: center;
  margin-top: 2rem;
  color: #777;
}

.cart-item {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.cart-item-image {
  width: 70px;
  height: 70px;
  object-fit: cover;
}

.cart-item-details {
  flex-grow: 1;
}

.cart-item-name {
  font-weight: bold;
  margin-bottom: 0.25rem;
}

.cart-item-price {
  color: #555;
  margin-bottom: 0;
}

.mini-cart-footer {
  padding: 1.5rem;
  border-top: 2px solid var(--primary-color);
  background-color: var(--background-color);
}

.mini-cart-footer p {
  display: flex;
  justify-content: space-between;
  font-size: 1.2rem;
  font-weight: bold;
}

.checkout-btn {
  display: block;
  width: 100%;
  background-color: var(--accent-color);
  color: #fff;
  padding: 0.8rem 2rem;
  font-family: var(--font-heading);
  text-transform: uppercase;
  font-weight: 700;
  border-radius: 4px;
  border: 2px solid var(--accent-color);
  transition: all 0.3s ease;
  cursor: pointer;
  text-align: center;
}

.checkout-btn:hover {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
  color: #fff;
}

/* --- Footer --- */
.main-footer {
  background-color: var(--text-color);
  color: var(--background-color);
  padding: 3rem 0;
  margin-top: 4rem;
}

.footer-container {
  display: flex;
  flex-direction: column;
  text-align: center;
  gap: 2rem;
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-column h4 {
  color: var(--accent-color);
  margin-bottom: 1rem;
}

.footer-column ul {
  list-style: none;
}

.footer-column ul li {
  margin-bottom: 0.5rem;
}

.footer-column a {
  color: #ccc;
}

.footer-column a:hover {
  color: #fff;
}

.social-icons a {
  margin: 0 0.5rem;
  font-size: 1.5rem;
}

.footer-bottom {
  border-top: 1px solid #555;
  padding-top: 1.5rem;
  margin-top: 1.5rem;
  font-size: 0.9rem;
}

/* --- Responsiveness (Mobile First) --- */

/* Small mobile devices */
@media (max-width: 767px) {
  .main-nav ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #fff;
    padding: 1rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }

  .main-nav ul.active {
    display: flex;
  }

  .main-nav li {
    text-align: center;
  }

  .nav-toggle {
    display: block;
  }
}

/* Tablet Styles */
@media (min-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-container {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* Desktop Styles */
@media (min-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .main-nav ul {
    display: flex;
  }

  .nav-toggle {
    display: none;
  }
}