/* General Body & Font Setup */
body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  background-color: #f9f9f9;
  color: #333;
}

/* Main Layout Container */
.container {
  display: flex;
  min-height: 100vh;
}

/* --- Left Sidebar --- */
.sidebar {
  width: 220px;
  background: #f6f9f6;
  padding: 20px 15px;
  border-right: 1px solid #eee;
  flex-shrink: 0;
}

.sidebar .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 30px;
}
.sidebar .logo img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
}
.sidebar .logo h3 {
  font-family: "Poppins", sans-serif;
  color: #2d6a4f;
  font-size: 24px;
  font-weight: 400;
}

.sidebar nav ul {
  list-style: none;
  padding: 0;
}
.sidebar nav ul a {
  text-decoration: none;
  color: inherit;
}
.sidebar nav ul li {
  padding: 12px 5px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #2d6a4f;
  font-size: 15px;
  cursor: pointer;
  border-radius: 8px;
  transition: background-color 0.3s;
}

.sidebar nav ul li:hover {
  background-color: #e8f5e9;
}

.sidebar nav .icons {
  width: 20px;
  height: 20px;
}

/* --- Main Content Area --- */
.main-content {
  flex-grow: 1;
  padding: 2rem 3rem;
  overflow-y: auto;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  font-size: 2.8rem;
  font-weight: 700;
  color: #2d6a4f;
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.1rem;
  color: #666;
  max-width: 600px;
  margin: 0 auto;
}

/* --- Product Grid (product.html) --- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.product-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  border: 1px solid #eee;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 20px rgba(45, 106, 79, 0.1);
  border-color: #2d6a4f;
}

.product-image-wrapper {
  width: 94%;
  height: 220px;
  margin-bottom: 1rem;
  border-radius: 8px;
  background: linear-gradient(135deg, #f0f9f7 0%, #e8f5e9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.product-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.product-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: #1b4332;
  margin-bottom: 0.5rem;
}

.product-price {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.price-current {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2d6a4f;
}

.product-description {
  color: #666;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  flex-grow: 1; /* Makes description take up available space */
}

/* --- Buy Now Page (buynow.html) --- */

.checkout-container {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  max-width: 1200px;
  margin: 2rem auto;
  background: white;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.07);
}

.product-details-section .product-image {
  width: 100%;
  max-height: 400px;
  object-fit: contain;
  background: #f8f8f8;
  border-radius: 12px;
  border: 1px solid #eee;
  padding: 1rem;
}

.product-details-section .product-name {
  font-size: 2rem;
  font-weight: 700;
  color: #1b4332;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.product-details-section .product-price {
  font-size: 1.25rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 1rem;
}

.product-details-section .product-description {
  font-size: 1rem;
  color: #555;
  line-height: 1.6;
}

.purchase-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-section-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #333;
  border-bottom: 2px solid #eee;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

/* Fragrance Selector */
.fragrance-selector {
  display: flex;
  gap: 0.75rem;
}
.fragrance-btn {
  flex: 1;
  padding: 0.75rem;
  border: 2px solid #ddd;
  background-color: #fff;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: "Poppins", sans-serif;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.fragrance-btn:hover {
  border-color: #2d6a4f;
  color: #2d6a4f;
}
.fragrance-btn.active {
  background-color: #e8f5e9;
  border-color: #2d6a4f;
  color: #1b4332;
  box-shadow: 0 2px 4px rgba(45, 106, 79, 0.1);
}

.quantity-selector {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.quantity-btn {
  width: 40px;
  height: 40px;
  border: 1px solid #ccc;
  background-color: #f9f9f9;
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: 300;
  cursor: pointer;
  transition: background-color 0.2s;
}
.quantity-btn:hover {
  background-color: #eee;
}

#quantity-input {
  width: 50px;
  height: 40px;
  text-align: center;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1.2rem;
  font-weight: 600;
}
#quantity-input::-webkit-outer-spin-button,
#quantity-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.total-price-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.2rem;
  font-weight: 600;
  padding-top: 0.5rem;
}

#total-price {
  font-size: 1.8rem;
  font-weight: 700;
  color: #2d6a4f;
}

.payment-options .payment-option {
  display: flex;
  align-items: center;
  padding: 1rem;
  border: 2px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.3s, background-color 0.3s;
  margin-bottom: 1rem;
}
.payment-options .payment-option:hover {
  background-color: #f6f9f6;
}
.payment-options .payment-option.selected {
  border-color: #2d6a4f;
  background-color: #e8f5e9;
}
.payment-option input[type="radio"] {
  display: none;
}
.payment-option-details {
  margin-left: 1rem;
}
.payment-option-details .name {
  font-weight: 600;
  color: #333;
}
.payment-option img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

/* Action Buttons & Cart */
.buy-now-btn,
.add-to-cart-btn {
  width: 94%;
  padding: 1rem;
  border-radius: 8px;
  font-weight: 600;
  font-family: "Poppins", sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  text-decoration: none;
}

.add-to-cart-btn {
  background: white;
  color: #2d6a4f;
  border: 2px solid #2d6a4f;
}
.add-to-cart-btn:hover {
  background: #e8f5e9;
  transform: translateY(-2px);
}

.buy-now-btn {
  background: linear-gradient(135deg, #2d6a4f 0%, #1b4332 100%);
  color: white;
  border: none;
}
.buy-now-btn:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 12px rgba(45, 106, 79, 0.3);
}

.cart-summary {
  background-color: #f6f9f6;
  border: 1px solid #e8f5e9;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: #2d6a4f;
  transition: all 0.3s ease;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  margin-top: 1rem;
}
.cart-summary.visible {
  opacity: 1;
  max-height: 100px;
}

/* Toast Notification */
.toast-notification {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #1b4332;
  color: white;
  padding: 12px 25px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, bottom 0.3s;
}
.toast-notification.show {
  opacity: 1;
  visibility: visible;
  bottom: 30px;
}

/* Responsive Design */
@media (max-width: 992px) {
  .checkout-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    transform: translateX(-100%);
    z-index: 1000;
    height: 100%;
  }
  .main-content {
    padding: 1.5rem;
  }
  .section-title {
    font-size: 1.75rem;
  }
}
