:root {
  --color-bg: #Fbf9f7;
  --color-surface: #ffffff;
  --color-text: #2c2c2c;
  --color-text-light: #7a7a7a;
  --color-primary: #D194A1; /* Premium Rose Gold */
  --color-primary-dark: #b87b87;
  --color-secondary: #c9a45c; /* Soft Gold */
  --font-sans: 'Inter', sans-serif;
  --font-serif: 'Playfair Display', serif;
  --radius: 12px;
  --shadow-sm: 0 4px 12px rgba(0,0,0,0.06);
  --shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 40px -10px rgba(0, 0, 0, 0.15);
  --border-color: #f0ebe4;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 80px; /* Space for mobile sticky footer */
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 1rem;
}

a {
  color: inherit;
  text-decoration: none;
}

button, .btn {
  background-color: var(--color-primary);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-family: var(--font-sans);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(209, 148, 161, 0.4); /* Popped up default shadow */
}

button:hover, .btn:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-4px) scale(1.02); /* More extreme pop on hover */
  box-shadow: 0 10px 25px rgba(209, 148, 161, 0.6);
}

button:active, .btn:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: 0 4px 10px rgba(209, 148, 161, 0.4);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

input, select, textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--border-color);
  background-color: var(--color-surface);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 1rem;
  margin-bottom: 1.25rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(209, 148, 161, 0.15);
}

.card {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

/* Navigation */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-weight: 500;
  font-size: 1.05rem;
  transition: color 0.2s;
}
.nav-links a:hover {
  color: var(--color-primary);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-img {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.logo-text {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: 1px;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 2rem 1rem 3rem 1rem; /* Reduced top padding significantly */
  background: linear-gradient(to right, #fbf9f7, #f6f0ea);
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

@media (max-width: 768px) {
  .hero h1 { font-size: 2.5rem; }
  .hero { padding: 1.5rem 1rem 2rem 1rem; }
}

/* Products */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2.5rem;
  margin-top: 2rem;
}

@media (max-width: 768px) {
  /* Force 2-column layout on mobile, shrinking product cards */
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem; /* Less gap for mobile */
  }
}

.product-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
  position: relative;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.product-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-lg);
}

.product-image-wrapper {
  position: relative;
  width: 100%;
  padding-top: 100%; /* 1:1 Aspect ratio */
  background: #fcfcfc;
}

.product-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.15s ease-in-out;
}

.badge-discount {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: #ff4757;
  color: white;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(255,71,87,0.3);
  z-index: 10;
}

.product-info {
  padding: 1.5rem;
}

.product-title {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--font-sans);
  font-weight: 500;
}

.price-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap; /* Wrap prices on very small screens */
}

.price-regular {
  color: var(--color-text-light);
  text-decoration: line-through;
  font-size: 0.95rem;
}

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

@media (max-width: 768px) {
  /* Smaller card info on mobile to fit 2 columns */
  .product-info { padding: 1rem; }
  .product-title { font-size: 0.95rem; }
  .price-final { font-size: 1rem; }
  .price-regular { font-size: 0.8rem; }
  .badge-discount { 
    top: 0.5rem; right: 0.5rem; 
    padding: 0.25rem 0.5rem; font-size: 0.7rem; 
  }
}

/* Product Details Page */
.product-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  max-width: 1100px;
  margin: 0 auto;
}

@media (min-width: 800px) {
  .product-layout { grid-template-columns: 1fr 1fr; }
}

.sticky-bottom-bar {
  display: none;
}

@media (max-width: 768px) {
  .sticky-bottom-bar {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    z-index: 99;
  }
}

/* Floating Messenger Widget */
.messenger-widget {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 9999;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.messenger-widget:hover {
  transform: translateY(-5px) scale(1.05);
}

.messenger-text {
  background: white;
  color: #333;
  padding: 0.5rem 1.25rem;
  border-radius: 20px;
  font-weight: 500;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  position: relative;
}

/* Small triangle pointer for the text bubble */
.messenger-text::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  border-width: 6px 0 6px 6px;
  border-style: solid;
  border-color: transparent transparent transparent white;
}

.messenger-icon-wrapper {
  background: #0084ff; /* Messenger blue */
  width: 55px;
  height: 55px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0, 132, 255, 0.4);
}

@media (max-width: 768px) {
  /* Move it up slightly on mobile so it doesn't block the sticky buy button on product pages */
  .messenger-widget {
    bottom: 85px; 
    right: 1.5rem;
  }
}

/* Admin Styles */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 250px;
  background-color: var(--color-surface);
  padding: 2rem;
  box-shadow: 2px 0 10px rgba(0,0,0,0.02);
}

.admin-content {
  flex: 1;
  padding: 3rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius);
  overflow: hidden;
}

th, td {
  padding: 1.25rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

th {
  background-color: #faf8f5;
  font-weight: 600;
  color: var(--color-text);
}

.error-msg {
  color: #c0392b;
  background-color: #fadbd8;
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

/* Footer */
.site-footer {
  background-color: #fff;
  border-top: 1px solid var(--border-color);
  padding: 4rem 1rem 3rem 1rem;
  margin-top: 5rem;
  text-align: center;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
}

/* Color Swatches */
.color-swatch-label {
  cursor: pointer;
  display: inline-block;
}

.color-swatch-label input[type="radio"] {
  display: none;
}

.color-swatch {
  display: inline-block;
  width: 35px;
  height: 35px;
  border-radius: 6px;
  border: 1px solid #ddd;
  padding: 2px;
  background-clip: content-box;
  transition: all 0.2s ease;
}

.color-swatch-label input[type="radio"]:checked + .color-swatch {
  border: 2px solid var(--color-text);
  padding: 2px;
  transform: scale(1.1);
}

/* Quantity Selector */
.quantity-selector {
  display: inline-flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.qty-btn {
  background: transparent;
  border: none;
  color: var(--color-text-light);
  font-size: 1.25rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  box-shadow: none;
  border-radius: 0;
  transition: background 0.2s;
}

.qty-btn:hover {
  background: #f5f5f5;
  transform: none;
  box-shadow: none;
  color: var(--color-text);
}

.qty-input {
  width: 50px;
  border: none;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 500;
  padding: 0.5rem;
  margin: 0;
  box-shadow: none;
  -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

