/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Poppins:wght@300;400;500;600;700&display=swap');

/* Autumn Crush Heading font fallback styled via styling rules */
@font-face {
  font-family: 'Autumn Crush';
  src: local('Georgia'), local('Times New Roman');
}

:root {
  /* HSL Color System */
  --primary-hue: 25;
  --primary-sat: 90%;
  --primary-light: 48%;
  --primary: hsl(var(--primary-hue), var(--primary-sat), var(--primary-light)); /* Warm amber-orange */
  --primary-hover: hsl(var(--primary-hue), var(--primary-sat), 38%);
  --primary-glow: hsla(var(--primary-hue), var(--primary-sat), var(--primary-light), 0.15);
  
  --accent-hue: 340;
  --accent-sat: 75%;
  --accent: hsl(var(--accent-hue), var(--accent-sat), 45%); /* Rose-pink accent */
  
  --text-main: hsl(25, 15%, 20%); /* Warm dark brown */
  --text-dark: hsl(25, 20%, 8%); /* Near-black warm tone */
  --text-muted: hsl(25, 10%, 52%); /* Warm muted */
  --bg-light: hsl(36, 30%, 97%); /* Warm off-white/cream */
  --bg-white: hsl(36, 20%, 99%); /* Very warm white */
  --border-color: hsl(30, 20%, 88%); /* Warm beige border */
  
  --tag-sale: hsl(340, 85%, 45%); /* Rose sale tag */
  --stars: hsl(44, 100%, 50%); /* #ffb900 */
  
  --shadow-sm: 0 2px 8px rgba(120, 60, 0, 0.06);
  --shadow-md: 0 8px 24px rgba(120, 60, 0, 0.09);
  --shadow-lg: 0 16px 40px rgba(120, 60, 0, 0.13);
  
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Global Reset & Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-family: 'Poppins', sans-serif;
  color: var(--text-main);
  background-color: var(--bg-light);
  -webkit-font-smoothing: antialiased;
}

body {
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  color: var(--text-dark);
  font-weight: 600;
  line-height: 1.25;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-smooth);
}

button {
  cursor: pointer;
  border: none;
  outline: none;
  background: none;
  font-family: inherit;
  transition: var(--transition-smooth);
}

/* Scrollbar Customisation */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-light);
}
::-webkit-scrollbar-thumb {
  background: #cecece;
  border-radius: 20px;
}
::-webkit-scrollbar-thumb:hover {
  background: #b5b5b5;
}

/* Glassmorphism Header */
.header-glass {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px 24px;
}

.logo img {
  height: 48px;
  display: block;
  transition: var(--transition-smooth);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav-links a {
  font-weight: 500;
  font-size: 15px;
  position: relative;
  padding: 4px 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: var(--transition-smooth);
}

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

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.action-btn {
  position: relative;
  font-size: 20px;
  color: var(--text-dark);
}

.action-btn:hover {
  color: var(--primary);
  transform: translateY(-2px);
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: var(--tag-sale);
  color: var(--bg-white);
  font-size: 11px;
  font-weight: 700;
  height: 18px;
  width: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Sidebar Drawer Cart */
.cart-drawer {
  position: fixed;
  top: 0;
  right: -450px;
  width: 440px;
  max-width: 100%;
  height: 100vh;
  background: var(--bg-white);
  box-shadow: var(--shadow-lg);
  z-index: 1100;
  transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.cart-drawer.open {
  right: 0;
}

.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1050;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-smooth);
}

.cart-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.cart-header {
  padding: 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-title {
  font-size: 20px;
  font-weight: 600;
}

.close-drawer {
  font-size: 24px;
  color: var(--text-dark);
}

.close-drawer:hover {
  color: var(--tag-sale);
  transform: rotate(90deg);
}

.cart-items {
  flex-grow: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cart-empty-message {
  margin: auto;
  text-align: center;
  color: var(--text-muted);
  font-size: 16px;
}

.cart-footer {
  padding: 24px;
  border-top: 1px solid var(--border-color);
}

.cart-subtotal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  font-size: 18px;
  font-weight: 600;
}

.cart-btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 14px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
}

.cart-btn-primary {
  background-color: var(--primary);
  color: var(--bg-white);
  box-shadow: 0 4px 12px var(--primary-glow);
}

.cart-btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
}

/* Premium Styling Utilities & Grid */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-padding {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
}

.section-title h2 {
  font-size: 36px;
  color: var(--text-dark);
  margin-bottom: 15px;
}

.section-title p {
  color: var(--text-muted);
  font-size: 16px;
  max-width: 600px;
  margin: 0 auto;
}

/* Product Card Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 30px;
}

.product-card {
  background: var(--bg-white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-bounce);
  position: relative;
  display: flex;
  flex-direction: column;
}

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

.card-img-wrap {
  width: 100%;
  height: 300px;
  overflow: hidden;
  position: relative;
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.card-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background-color: var(--tag-sale);
  color: var(--bg-white);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 30px;
  z-index: 10;
}

.card-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: 17px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-dark);
  line-height: 1.4;
}

.card-rating {
  display: flex;
  gap: 3px;
  color: var(--stars);
  font-size: 13px;
  margin-bottom: 12px;
}

.card-price-wrap {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: auto;
}

.card-price {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-dark);
}

.card-regular-price {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  color: var(--text-muted);
  text-decoration: line-through;
}

.discount-badge {
  background: var(--primary-glow);
  color: var(--primary);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-left: 6px;
  border: 1px solid rgba(9, 177, 236, 0.2);
}

/* Footer layout */
footer {
  background-color: var(--bg-white);
  border-top: 1px solid var(--border-color);
  padding: 80px 0 30px;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr 1.5fr;
  gap: 40px;
  margin-bottom: 60px;
}

.footer-about p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
  margin-top: 15px;
  margin-bottom: 20px;
  max-width: 320px;
}

.footer-socials {
  display: flex;
  gap: 12px;
}

.social-icon {
  height: 36px;
  width: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  font-size: 16px;
}

.social-icon:hover {
  background-color: var(--primary);
  color: var(--bg-white);
  border-color: var(--primary);
  transform: translateY(-3px);
}

.footer-col h4 {
  font-size: 18px;
  margin-bottom: 24px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col ul a {
  color: var(--text-muted);
  font-size: 14px;
}

.footer-col ul a:hover {
  color: var(--primary);
  padding-left: 5px;
}

.newsletter-form {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.newsletter-form input {
  flex-grow: 1;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  outline: none;
  font-family: inherit;
  font-size: 14px;
}

.newsletter-form button {
  background-color: var(--primary);
  color: var(--bg-white);
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 500;
}

.newsletter-form button:hover {
  background-color: var(--primary-hover);
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none; /* In a real project we would add a burger menu, we'll implement toggle for mobile */
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  .section-padding {
    padding: 60px 0;
  }
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}
