﻿:root {
  --primary-color: #c59b76; /* Rose Gold / Warm Tan */
  --primary-light: #e6c8b3; /* Soft Peach */
  --secondary-color: #1a1a1a; /* Onyx Black */
  --accent-color: #b0815e; /* Earthy Accent */
  --bg-color: #fdfaf8; /* Pearl White */
  --card-bg: #ffffff;
  --white: #ffffff;
  --text-main: #2b2b2b;
  --text-light: #888888;
  --border-color: #f0eaea;
  --border-radius: 12px;
  --transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
  color: var(--secondary-color);
  font-weight: 500;
  letter-spacing: -0.02em;
}

/* Header & Glassmorphism Navbar */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.3);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
}

.navbar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.2rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 2.2rem;
  font-family: 'Playfair Display', serif;
  font-weight: 800;
  text-decoration: none;
  color: var(--secondary-color);
  letter-spacing: -0.5px;
  position: relative;
  z-index: 1;
}

.logo span {
  color: var(--primary-color);
  font-style: italic;
  font-weight: 600;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-main);
  font-weight: 500;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--primary-color);
  transition: var(--transition);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a:hover {
  color: var(--primary-color);
}

.cart-icon {
  position: relative;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--secondary-color);
  transition: transform 0.3s ease;
}

.cart-icon:hover {
  transform: scale(1.1);
  color: var(--primary-color);
}

.cart-count {
  position: absolute;
  top: -6px;
  right: -8px;
  background-color: var(--accent-color);
  color: #fff;
  font-size: 0.7rem;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-family: 'Inter', sans-serif;
  font-weight: bold;
}

/* Main Container */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  min-height: calc(100vh - 300px);
}

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

@keyframes pulseSoft {
  0% { box-shadow: 0 0 0 0 rgba(197, 155, 118, 0.4); }
  70% { box-shadow: 0 0 0 15px rgba(197, 155, 118, 0); }
  100% { box-shadow: 0 0 0 0 rgba(197, 155, 118, 0); }
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 10rem 2rem;
  background: linear-gradient(rgba(26, 26, 26, 0.4), rgba(26, 26, 26, 0.6)), url('https://images.unsplash.com/photo-1515886657613-9f3515b0c78f?q=80&w=1920&auto=format&fit=crop') center/cover;
  border-radius: var(--border-radius);
  margin-bottom: 5rem;
  color: #fff;
  box-shadow: 0 15px 35px rgba(26, 26, 26, 0.1);
  position: relative;
  overflow: hidden;
  animation: fadeInUp 1s ease-out;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at center, transparent 0%, rgba(0,0,0,0.3) 100%);
  pointer-events: none;
}

.hero h1 {
  font-size: 4.5rem;
  margin-bottom: 1rem;
  color: #fff;
  letter-spacing: 1px;
  text-shadow: 2px 4px 10px rgba(0,0,0,0.3);
  position: relative;
  z-index: 2;
  animation: fadeInUp 1.2s ease-out forwards;
}

.hero p {
  font-size: 1.3rem;
  max-width: 650px;
  margin: 0 auto 2.5rem;
  font-weight: 300;
  opacity: 0.95;
  position: relative;
  z-index: 2;
  text-shadow: 1px 2px 5px rgba(0,0,0,0.2);
  animation: fadeInUp 1.4s ease-out forwards;
}

.hero .btn.btn-primary {
  animation: pulseSoft 2s infinite, fadeInUp 1.6s ease-out forwards;
  position: relative;
  z-index: 2;
}

/* Category Filters */
.category-filters {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.6rem 1.5rem;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  border-radius: 30px;
  cursor: pointer;
  font-weight: 500;
  color: var(--text-light);
  transition: var(--transition);
}

.filter-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.filter-btn.active {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
  box-shadow: 0 4px 15px rgba(197, 155, 118, 0.3);
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 3rem;
}

.product-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.03);
  transition: var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color);
  animation: fadeInUp 0.8s ease-out backwards;
}

/* Staggered animation */
.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }
.product-card:nth-child(4) { animation-delay: 0.4s; }

.product-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 20px 40px rgba(197, 155, 118, 0.15);
  border-color: rgba(197, 155, 118, 0.1);
}

.product-image-wrap {
  position: relative;
  overflow: hidden;
  height: 350px;
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.product-card:hover .product-image {
  transform: scale(1.05);
}

.product-info {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  text-align: center;
}

.product-title {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  text-decoration: none;
  color: var(--secondary-color);
  font-family: 'Playfair Display', serif;
  font-weight: 600;
}

.product-price {
  font-size: 1.1rem;
  color: var(--accent-color);
  font-weight: 600;
  margin-bottom: 1.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 1rem 2rem;
  border: none;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 300%;
  height: 300%;
  background: rgba(255,255,255,0.1);
  transform: translate(-50%, -50%) rotate(45deg) translateY(100%);
  transition: var(--transition);
}

.btn:hover::after {
  transform: translate(-50%, -50%) rotate(45deg) translateY(0);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: #fff;
  box-shadow: 0 8px 25px rgba(197, 155, 118, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(197, 155, 118, 0.5);
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-outline:hover {
  background-color: var(--primary-color);
  color: #fff;
  box-shadow: 0 8px 25px rgba(197, 155, 118, 0.3);
}

.btn-block {
  display: block;
  width: 100%;
  margin-top: auto;
}

/* Cart Sidebar (Offcanvas) */
.cart-sidebar {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  max-width: 100%;
  height: 100vh;
  background: var(--card-bg);
  box-shadow: -5px 0 30px rgba(0,0,0,0.1);
  z-index: 2000;
  transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  flex-direction: column;
}

.cart-sidebar.open {
  right: 0;
}

.cart-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-header h2 {
  font-size: 1.5rem;
  margin: 0;
}

.close-cart {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-light);
  transition: var(--transition);
}

.close-cart:hover {
  color: var(--secondary-color);
  transform: rotate(90deg);
}

.cart-body {
  padding: 1.5rem 2rem;
  flex-grow: 1;
  overflow-y: auto;
}

.sidebar-cart-item {
  display: flex;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-cart-img {
  width: 80px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  margin-right: 1rem;
}

.sidebar-cart-details {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.sidebar-cart-title {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  color: var(--secondary-color);
  margin-bottom: 0.2rem;
}

.sidebar-cart-meta {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.sidebar-cart-price {
  color: var(--accent-color);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.qty-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.qty-btn {
  background: #f0f0f0;
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.qty-btn:hover { background: #e0e0e0; }

.remove-item-btn {
  background: none;
  border: none;
  color: #ff4d4f;
  font-size: 0.85rem;
  cursor: pointer;
  margin-top: auto;
  align-self: flex-start;
  text-decoration: underline;
}

.cart-footer {
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--border-color);
  background: #fafafa;
}

.cart-footer-total {
  display: flex;
  justify-content: space-between;
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 1.5rem;
  color: var(--secondary-color);
}

.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(3px);
  z-index: 1500;
  display: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.cart-overlay.show {
  display: block;
  opacity: 1;
}

/* Toast Notification */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--secondary-color);
  color: #fff;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInRight 0.3s ease forwards;
  opacity: 0;
  transform: translateX(100%);
}

.toast.fade-out {
  animation: fadeOutRight 0.5s ease forwards;
}

@keyframes slideInRight {
  to { opacity: 1; transform: translateX(0); }
}
@keyframes fadeOutRight {
  to { opacity: 0; transform: translateX(100%); }
}

/* Footer */
footer {
  background-color: var(--secondary-color);
  color: #fff;
  padding: 4rem 2rem 2rem;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-col h3 {
  color: var(--accent-color);
  margin-bottom: 1.5rem;
}

.footer-col p { color: #ccc; margin-bottom: 1rem; }
.footer-col a { color: #ccc; text-decoration: none; display: block; margin-bottom: 0.5rem; transition: var(--transition); }
.footer-col a:hover { color: var(--primary-color); }

.social-icons { display: flex; gap: 1rem; margin-top: 1rem; }
.social-icons a { 
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.1); 
  color: #fff; font-size: 1.2rem; transition: var(--transition);
}
.social-icons a:hover { background: var(--primary-color); transform: translateY(-3px); }

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  color: #888;
  font-size: 0.9rem;
}

/* Utilities */
.text-center { text-align: center; }
.mb-2 { margin-bottom: 2rem; }
.mt-2 { margin-top: 2rem; }

/* Responsive */
@media (max-width: 768px) {
  .navbar { padding: 1rem; }
  .nav-links { gap: 1rem; }
  .nav-links a { font-size: 0.85rem; }
  
  main { padding: 1rem; margin-top: 1rem; }
  
  .hero { padding: 4rem 1rem; margin-bottom: 3rem; }
  .hero h1 { font-size: 2.2rem; }
  .hero p { font-size: 1.1rem; margin-bottom: 1.5rem; }
  
  .category-filters { gap: 0.5rem; margin-bottom: 2rem; }
  .filter-btn { padding: 0.5rem 1rem; font-size: 0.85rem; }
  
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(100%, 1fr)); gap: 2rem; }
  .product-image-wrap { height: 300px; }
  
  .cart-sidebar { width: 100%; right: -100%; }
  
  .footer-content { grid-template-columns: 1fr; text-align: center; gap: 2.5rem; }
  .social-icons { justify-content: center; }
  
  /* Reset modals for mobile */
  .modal-content { padding: 1.5rem; margin: 1rem; width: auto; max-width: none; }
}

/* Loading Spinner */
.loader {
  border: 3px solid #f3f3f3;
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 3rem auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
