/* static/css/shop.css - Styles for Strawberry in Chocolate shop */

body {
  background: #f5f0e1; /* Cream/beige background */
  color: #3a1f0d; /* Dark chocolate text color */
  font-family: 'Montserrat', sans-serif;
  min-height: 100vh;
  background-attachment: fixed;
}

.card {
  background-color: #fff;
  border: none;
  border-radius: 16px;
  box-shadow: 0 0 20px rgba(165, 42, 42, 0.1);
  color: #3a1f0d;
}

.card-title {
  color: #c23616; /* Strawberry color */
}

.btn-primary {
  background: linear-gradient(to right, #c23616, #6d1609); /* Strawberry to dark strawberry */
  border: none;
}

.btn-success {
  background: linear-gradient(to right, #c23616, #3a1f0d); /* Strawberry to chocolate */
  border: none;
}

.btn-category {
  background: linear-gradient(45deg, #3a1f0d, #c23616);
  border: none;
  color: white;
  border-radius: 12px;
  padding: 20px 30px;
  font-weight: 600;
  font-size: 18px;
  font-family: 'Cormorant Garamond', serif;
  transition: all 0.3s ease;
  width: calc(100% - 40px);
  margin: 0 20px 20px 20px;
}

.btn-category:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(194, 54, 22, 0.4);
  color: white;
}

.btn-category:last-child {
  margin-bottom: 0;
}

.cart-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
  border-radius: 50px;
  padding: 15px 25px;
}

.cart-counter {
  background: #c23616;
  color: white;
  border-radius: 50%;
  padding: 4px 8px;
  font-size: 12px;
  margin-left: 8px;
  position: absolute;
  top: -8px;
  right: -8px;
}

h2, h4 {
  color: #c23616;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
}

.form-select {
  background-color: #fff8f2;
  color: #3a1f0d;
  border: 1px solid #6d1609;
}

.shadow-hover:hover {
  box-shadow: 0 0 30px rgba(194, 54, 22, 0.3), 0 0 10px rgba(58, 31, 13, 0.4);
  transform: scale(1.02);
  transition: all 0.3s ease;
}

.cart-item {
  background-color: #fff8f2;
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 10px;
  border: 1px solid #6d1609;
}

.remove-btn {
  background: linear-gradient(45deg, #c23616, #6d1609);
  border: none;
  color: white;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 12px;
}

#cartModal .modal-content {
  background-color: #fff8f2;
  border: none;
  color: #3a1f0d;
}

#cartModal .modal-header {
  border-bottom: 1px solid #6d1609;
}

#cartModal .modal-footer {
  border-top: 1px solid #6d1609;
}

.loading {
  text-align: center;
  padding: 40px;
}

.loading::after {
  content: '';
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid #c23616;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.logo-glow {
  filter: drop-shadow(0 0 10px #c23616);
  animation: glow 2s ease-in-out infinite alternate;
}

.back-btn {
  background: linear-gradient(45deg, #3a1f0d, #c23616);
  border: none;
  color: white;
  border-radius: 8px;
  padding: 8px 16px;
  transition: all 0.3s ease;
}

@keyframes glow {
  from {
    filter: drop-shadow(0 0 10px #c23616);
  }
  to {
    filter: drop-shadow(0 0 20px #c23616) drop-shadow(0 0 30px #c23616);
  }
}

/* Custom notification */
.custom-notification {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(45deg, #3a1f0d, #c23616);
  color: white;
  padding: 20px 30px;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(194, 54, 22, 0.4);
  z-index: 9999;
  text-align: center;
  font-weight: bold;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8);
  transition: all 0.3s ease;
}

.custom-notification.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* PRODUCT GRID STYLES */
.product-grid-card {
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 15px;
}

.product-grid-card:hover {
  transform: translateY(-5px);
}

.product-image-container {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid #d4b9a0;
  transition: all 0.3s ease;
  background: white;
}

.product-grid-card:hover .product-image-container {
  border-color: #c23616;
  box-shadow: 0 8px 25px rgba(194, 54, 22, 0.4);
}

.product-grid-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#productModal .modal-title, #cartModal .modal-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  color: #3a1f0d;
}

.product-grid-title {
  color: #3a1f0d;
  font-weight: 600;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  text-align: center;
  margin-top: 8px;
  line-height: 1.2;
}

.product-grid-price {
  color: #6d1609;
  font-weight: bold;
  font-size: 13px;
  text-align: center;
  margin-top: 4px;
}

/* CASHBACK CORNER STYLES */
.cashback-corner {
  position: fixed;
  top: 20px;
  left: 20px;
  background: linear-gradient(45deg, #3a1f0d, #c23616);
  color: white;
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: bold;
  z-index: 998;
  box-shadow: 0 4px 15px rgba(194, 54, 22, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
}

.cashback-corner:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(194, 54, 22, 0.6);
}

/* Popup info panel */
.cashback-popup {
  position: fixed;
  top: 70px;
  left: 20px;
  background: linear-gradient(135deg, #fff8f2, #f5f0e1);
  color: #3a1f0d;
  padding: 15px;
  border-radius: 12px;
  font-size: 13px;
  z-index: 999;
  box-shadow: 0 8px 25px rgba(194, 54, 22, 0.4);
  border: 1px solid #d4b9a0;
  min-width: 200px;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  pointer-events: none;
}

.cashback-popup.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.cashback-popup::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 20px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid #fff8f2;
}

/* Updated styles for cashback section */
.cashback-section {
  background: linear-gradient(135deg, #fff8f2, #f5f0e1);
  border: 2px solid rgba(194, 54, 22, 0.3);
  border-radius: 16px;
  padding: 20px;
  margin-top: 20px;
  position: relative;
  overflow: hidden;
}

.cashback-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #c23616, #6d1609, #3a1f0d);
  opacity: 0.8;
}

.cashback-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
}

.cashback-title {
  color: #c23616;
  font-weight: bold;
  font-size: 16px;
  font-family: 'Cormorant Garamond', serif;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cashback-available {
  color: #3a1f0d;
  font-size: 14px;
  font-weight: 600;
}

.cashback-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.cashback-input-field {
  flex: 1;
  background: rgba(255, 255, 255, 0.5);
  border: 2px solid rgba(194, 54, 22, 0.5);
  border-radius: 12px;
  color: #3a1f0d;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  min-width: 0; /* Allows compression */
}

.cashback-input-field:focus {
  outline: none;
  border-color: #c23616;
  box-shadow: 0 0 15px rgba(194, 54, 22, 0.3);
  background: rgba(255, 255, 255, 0.8);
}

.cashback-input-field::placeholder {
  color: rgba(58, 31, 13, 0.6);
  font-weight: normal;
}

.cashback-apply-btn {
  background: linear-gradient(45deg, #3a1f0d, #c23616);
  border: none;
  border-radius: 10px;
  padding: 12px 14px;
  color: white;
  font-weight: bold;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.cashback-apply-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(194, 54, 22, 0.4);
  background: linear-gradient(45deg, #4d2913, #e04424);
}

.cashback-hint {
  background: rgba(194, 54, 22, 0.1);
  border: 1px solid rgba(194, 54, 22, 0.3);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  color: rgba(58, 31, 13, 0.8);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Styles for used cashback info */
.cashback-used-info {
  background: linear-gradient(135deg, rgba(194, 54, 22, 0.1), rgba(58, 31, 13, 0.1));
  border: 1px solid rgba(194, 54, 22, 0.3);
  border-radius: 12px;
  padding: 12px 16px;
  margin-top: 15px;
  text-align: center;
}

.cashback-used-amount {
  color: #c23616;
  font-weight: bold;
  font-size: 14px;
}

.final-total-display {
  background: linear-gradient(135deg, rgba(58, 31, 13, 0.1), rgba(109, 22, 9, 0.1));
  border: 2px solid rgba(58, 31, 13, 0.3);
  border-radius: 12px;
  padding: 15px;
  margin-top: 15px;
  text-align: center;
}

.final-total-text {
  color: #3a1f0d;
  font-weight: bold;
  font-size: 18px;
  margin: 0;
}

/* Animation for cashback section */
.cashback-section {
  animation: cashbackGlow 3s ease-in-out infinite alternate;
}

@keyframes cashbackGlow {
  from {
    box-shadow: 0 0 20px rgba(194, 54, 22, 0.2);
  }
  to {
    box-shadow: 0 0 30px rgba(194, 54, 22, 0.4), 0 0 40px rgba(58, 31, 13, 0.2);
  }
}

#productModal .modal-content {
  background: linear-gradient(135deg, #f5f0e1, #fff8f2);
  border: 1px solid #d4b9a0; 
  border-radius: 15px;
}

#productModalTitle, #productModalDescription {
  color: #3a1f0d;
}

#productModalPrice {
  color: #c23616;
}
