/* Store Application Styles */

/* Global Store Styles */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #f6f9fc 0%, #eef3f7 100%);
  margin: 0;
  min-height: 100vh;
  color: #2d3748;
}

/* Store Container */
.store-container {
  max-width: 1400px;
  margin: 2rem auto;
  border: 2rem #F2F6F9 solid;
  background: white;
  border-radius: 3rem 3rem 3rem 3rem;
  overflow: hidden;
  animation: slideInUp 0.8s ease-out;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Store Header */
.store-header {
  background: #2c77cc;
  color: white;
  padding: 3em 2.5em;
  text-align: center;
}

.store-title-section {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin-bottom: 0;
  position: relative;
  flex-wrap: wrap;
  gap: 1em;
}

.title-content {
  text-align: center;
  flex: 1;
  min-width: 0;
}

.title-content h1 {
  margin: 0 0 0.5em 0;
}

.title-content .store-description {
  margin: 0;
}

/* Cart Dropdown */
.cart-dropdown-container {
  position: relative;
  flex-shrink: 0;
}

.cart-dropdown-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  border-radius: 12px;
  padding: 0.8em 1.2em;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5em;
  transition: all 0.3s ease;
  font-size: 1em;
  position: relative;
  margin-bottom: 1.2rem;
}

.cart-dropdown-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

.cart-dropdown-badge {
  background: #48bb78;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8em;
  font-weight: 600;
  position: absolute;
  top: -8px;
  right: -8px;
}

.cart-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  width: 350px;
  max-width: 90vw;
  max-height: 500px;
  overflow: hidden;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  margin-top: 10px;
  border: 1px solid #e2e8f0;
}

.cart-dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.cart-dropdown-header {
  background: #f7fafc;
  padding: 1em 1.5em;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-dropdown-header h3 {
  margin: 0;
  color: #2d3748;
  font-size: 1.1em;
}

.close-dropdown-btn {
  background: none;
  border: none;
  color: #718096;
  cursor: pointer;
  padding: 0.2em;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.close-dropdown-btn:hover {
  color: #2d3748;
}

.cart-dropdown-content {
  max-height: 400px;
  overflow-y: auto;
}

.cart-dropdown-empty {
  text-align: center;
  padding: 2em 1.5em;
  color: #718096;
}

.cart-dropdown-empty i {
  font-size: 2.5em;
  color: #cbd5e0;
  margin-bottom: 0.5em;
}

.cart-dropdown-items {
  padding: 1em;
}

.cart-dropdown-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1em 0;
}

.cart-dropdown-list li {
  background: #f7fafc;
  padding: 0.8em;
  margin-bottom: 0.5em;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #e2e8f0;
  gap: 0.5em;
  min-height: 60px;
}

.cart-dropdown-list li > div:first-child {
  flex: 1;
  min-width: 0;
}

.cart-dropdown-list li button {
  flex-shrink: 0;
}

.cart-dropdown-total {
  background: #2c77cc;
  color: white;
  padding: 0.8em 1em;
  border-radius: 8px;
  margin-bottom: 1em;
  text-align: center;
  font-weight: 600;
}

.cart-dropdown-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.dropdown-checkout-btn {
  background: #48bb78;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.8em 1.5em;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  transition: all 0.2s ease;
}

.dropdown-checkout-btn:hover {
  background: #38a169;
}

.view-cart-btn {
  background: #2c77cc;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.6em 1.2em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  transition: all 0.2s ease;
}

.view-cart-btn:hover {
  background: #1b5bb3;
}

.store-header h1 {
  margin: 0 0 0.5em 0;
  font-size: 2.5em;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.store-description {
  font-size: 1.2em;
  opacity: 0.9;
  margin: 0;
}

/* Loading States */
.loading-container {
  text-align: center;
  padding: 4em 2em;
}

.loading-container p {
  margin-top: 1.5em;
  color: #666;
  font-size: 1.1em;
}

.error-message {
  text-align: center;
  padding: 3em 2em;
  background: #fef5e7;
  border: 1px solid #f6ad55;
  border-radius: 12px;
  margin: 2em;
  color: #744210;
}

.error-message i {
  font-size: 3em;
  color: #fff;
}
.fa-exclamation-triangle:before, .fa-triangle-exclamation:before, .fa-warning:before {
  color: #E53E3E;
}


.error-message h3 {
  margin: 0.5em 0;
  color: #744210;
}

.retry-btn {
  background: #e53e3e;
  color: white;
  border: none;
  padding: 0.8em 2em;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 1.5em;
  font-size: 1em;
  font-weight: 500;
  transition: all 0.2s ease;
}

.retry-btn:hover {
  background: #c53030;
  transform: translateY(-1px);
}

/* Products Section */

.products-filter {
  margin-bottom: 2em;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 1.5em;
}

.filter-options {
  display: flex;
  gap: 1em;
  flex-wrap: wrap;
  justify-content: center;
}

.filter-btn {
  background: #f7fafc;
  border: 2px solid #e2e8f0;
  color: #4a5568;
  padding: 0.7em 1.5em;
  border-radius: 25px;
  cursor: pointer;
  font-size: 0.95em;
  font-weight: 500;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5em;
}
@media (max-width: 768px) {
.filter-btn {
margin-left: 0.5rem;
margin-top: 0.2rem;
}
}

.filter-btn:hover {
  border-color: #2c77cc;
  color: #2c77cc;
  background: #edf4ff;
}

.filter-btn.active {
  background: #2c77cc;
  color: white;
  border-color: #2c77cc;
}

/* Products Grid */
.products-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 320px));
  gap: 2em;
  margin-bottom: 3em;
  justify-content: center;
}

.product-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.product-image {
  width: 100%;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2.5em;
  position: relative;
  overflow: hidden;
  padding: 15px;
  box-sizing: border-box;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.product-image .fallback-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  color: rgba(255, 255, 255, 0.8);
}

.product-content {
  padding: 1.5em;
}

.product-title-row {
  display: flex;
  align-items: flex-start;
  gap: 0.8em;
  margin-bottom: 0.8em;
}

.product-category-icon {
  background: #2c77cc;
  color: white;
  padding: 6px;
  border-radius: 50%;
  font-size: 14px;
  min-width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(44, 119, 204, 0.3);
  flex-shrink: 0;
  margin-top: 2px;
}

.product-card h3 {
  margin: 0;
  font-size: 1.3em;
  color: #2d3748;
  line-height: 1.4;
  flex: 1;
}

.product-card p {
  color: #718096;
  line-height: 1.6;
  margin-bottom: 1.5em;
  font-size: 0.95em;
}

.product-price {
  font-size: 1.8em;
  color: #2c77cc;
  font-weight: 600;
  margin-bottom: 1.2em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.price-badge {
  background: #48bb78;
  color: white;
  padding: 0.2em 0.8em;
  border-radius: 15px;
  font-size: 0.7em;
  font-weight: 500;
}

.product-card button {
  background: #2c77cc;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.8em 1.5em;
  cursor: pointer;
  font-size: 1em;
  font-weight: 500;
  width: 100%;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
}

.product-card button:hover {
  background: #1b5bb3;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(44, 119, 204, 0.3);
}

.product-card button:active {
  transform: translateY(0);
}

/* Featured Products Section */
.featured-banner {
  background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
  color: white;
  padding: 2.5rem;
  margin-bottom: 3rem;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}

.featured-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="40" height="40" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="smallGrid" width="8" height="8" patternUnits="userSpaceOnUse"><path d="M 8 0 L 0 0 0 8" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23smallGrid)" /></svg>');
  opacity: 0.3;
}

.banner-header {
  position: relative;
  z-index: 2;
  text-align: center;
  margin-bottom: 2rem;
}

.banner-header h2 {
  margin: 0 0 0.5rem 0;
  font-size: 2rem;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.banner-header h2 i {
  color: #fbbf24;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.banner-header p {
  margin: 0;
  opacity: 0.9;
  font-size: 1.1rem;
}

.featured-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  position: relative;
  z-index: 2;
}

/* Featured Product Cards */
.featured-product-card {
  background: white;
  border: 3px solid #fbbf24;
  border-radius: 16px;
  padding: 0;
  box-shadow: 0 8px 32px rgba(251, 191, 36, 0.3);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  transform: scale(1);
}

.featured-product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(251, 191, 36, 0.1) 0%, rgba(72, 187, 120, 0.1) 100%);
  z-index: 1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.featured-product-card:hover::before {
  opacity: 1;
}

.featured-product-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 16px 48px rgba(251, 191, 36, 0.4);
  border-color: #f59e0b;
}

/* Regular Product Cards - Enhanced Featured Styling */
/* Featured product styling disabled - only badge remains active */
.product-card.featured-product {
  /* All special styling removed - product looks normal except for badge */
}

.product-card.featured-product::before {
  display: none; /* Disable glow effect */
}

@keyframes featuredGlow {
  /* Animation kept for potential future use but not applied */
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.product-card.featured-product:hover {
  /* Same hover as regular products */
}

/* Featured Badge - Enhanced with !important for visibility */
.featured-badge {
  position: absolute !important;
  top: 8px !important;
  right: 8px !important;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%) !important;
  color: white !important;
  padding: 4px 8px !important;
  border-radius: 12px !important;
  font-size: 0.75rem !important;
  font-weight: bold !important;
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  z-index: 999 !important;
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.4) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  animation: featuredPulse 2s ease-in-out infinite;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.featured-badge i {
  font-size: 0.7rem;
  color: white;
  animation: starTwinkle 2s ease-in-out infinite;
}

@keyframes starTwinkle {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

@keyframes featuredPulse {
  0%, 100% {
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.4);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 4px 16px rgba(251, 191, 36, 0.6);
    transform: scale(1.02);
  }
}

/* Featured Price Badge */
.price-badge.featured {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  position: relative;
  overflow: hidden;
}

.price-badge.featured::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: badgeShine 2s ease-in-out infinite;
}

@keyframes badgeShine {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Product Description Modal */
.description-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
  padding: 1rem;
}

.description-modal.show {
  opacity: 1;
  visibility: visible;
}

.description-modal-content {
  background: white;
  border-radius: 16px;
  width: 100%;
  max-width: 600px;
  max-height: 80vh;
  overflow: hidden;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.description-modal.show .description-modal-content {
  transform: scale(1) translateY(0);
}

.description-modal-header {
  background: linear-gradient(135deg, #2c77cc, #1e5bb3);
  color: white;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 16px 16px 0 0;
}

.description-modal-header h3 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 600;
}

.close-modal-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-size: 1.1rem;
}

.close-modal-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.description-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 2rem;
}

.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e2e8f0;
}

.product-category-badge {
  background: linear-gradient(135deg, #2c77cc, #1e5bb3);
  color: white;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product-price-display {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2c77cc;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.description-content {
  color: #4a5568;
  line-height: 1.8;
  font-size: 1rem;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.description-content h1,
.description-content h2,
.description-content h3,
.description-content h4,
.description-content h5,
.description-content h6 {
  color: #2d3748;
  margin: 1.5rem 0 1rem 0;
  font-weight: 600;
}

.description-content h1 { font-size: 1.5rem; }
.description-content h2 { font-size: 1.3rem; }
.description-content h3 { font-size: 1.1rem; }

.description-content p {
  margin: 1rem 0;
}

.description-content ul,
.description-content ol {
  margin: 1rem 0;
  padding-left: 2rem;
}

.description-content li {
  margin: 0.5rem 0;
}

.description-content strong {
  font-weight: 600;
  color: #2d3748;
}

.description-content em {
  font-style: italic;
  color: #2c77cc;
}

.description-modal-footer {
  background: #f8fafc;
  padding: 1.5rem;
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.add-to-cart-modal-btn {
  background: linear-gradient(135deg, #48bb78, #38a169);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
}

.add-to-cart-modal-btn:hover {
  background: linear-gradient(135deg, #38a169, #2f855a);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(72, 187, 120, 0.4);
}

.modal-secondary-actions {
  display: flex;
  gap: 1rem;
}

.modal-action-btn {
  background: rgba(44, 119, 204, 0.1);
  color: #2c77cc;
  border: 1px solid rgba(44, 119, 204, 0.2);
  border-radius: 8px;
  padding: 0.8rem 1.5rem;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  justify-content: center;
  font-weight: 500;
}

.modal-action-btn:hover {
  background: rgba(44, 119, 204, 0.15);
  border-color: rgba(44, 119, 204, 0.3);
  transform: translateY(-1px);
}

/* Truncated Description Styling */
.product-description {
  color: #718096;
  line-height: 1.6;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}
/* Ensure links inside product descriptions are styled without affecting buttons */
.product-description a { color: #2c77cc; text-decoration: underline; }
.product-card .product-actions button,
.product-card .product-actions a { text-decoration: none; }

.description-truncated {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.learn-more-btn {
  background: transparent;
  border: none;
  color: #2c77cc;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0;
  transition: all 0.2s ease;
  margin-bottom: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.learn-more-btn:hover {
  background: #1b5bb3;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(44, 119, 204, 0.3);
}

/* Featured Product Actions */
.featured-product-card .product-actions,
.product-card.featured-product .product-actions {
  position: relative;
  z-index: 5;
}

.featured-product-card .add-to-cart-btn,
.product-card.featured-product .add-to-cart-btn {
  background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 16px rgba(72, 187, 120, 0.3);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.featured-product-card .add-to-cart-btn:hover,
.product-card.featured-product .add-to-cart-btn:hover {
  background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(72, 187, 120, 0.4);
}

/* Product Secondary Actions */
.product-secondary-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.8rem;
}

.preview-btn,
.reviews-btn {
  background: rgba(44, 119, 204, 0.1);
  color: #2c77cc;
  border: 1px solid rgba(44, 119, 204, 0.2);
  border-radius: 6px;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex: 1;
  justify-content: center;
}

.preview-btn:hover,
.reviews-btn:hover {
  background: rgba(44, 119, 204, 0.15);
  border-color: rgba(44, 119, 204, 0.3);
  transform: translateY(-1px);
}

.featured-product-card .preview-btn,
.featured-product-card .reviews-btn {
  background: rgba(251, 191, 36, 0.1);
  color: #d97706;
  border-color: rgba(251, 191, 36, 0.3);
}

.featured-product-card .preview-btn:hover,
.featured-product-card .reviews-btn:hover {
  background: rgba(251, 191, 36, 0.2);
  border-color: rgba(251, 191, 36, 0.4);
}

/* Shopping Cart */
.cart {
  background: linear-gradient(135deg, #f0f4ff 0%, #e8f2ff 100%);
  margin: 2em;
  border-radius: 12px;
  border: 1px solid #c5d9ff;
  overflow: hidden;
}

.cart-header {
  background: #2c77cc;
  color: white;
  padding: 1.5em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-header h2 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5em;
  font-size: 1.4em;
}

.cart-badge {
  background: #48bb78;
  color: white;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9em;
  font-weight: 600;
  animation: cartBounce 0.3s ease;
}

@keyframes cartBounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.empty-cart {
  text-align: center;
  padding: 3em 2em;
  color: #718096;
}

.empty-cart i {
  font-size: 4em;
  color: #cbd5e0;
  margin-bottom: 1em;
}

.empty-cart p {
  font-size: 1.1em;
  margin: 0.5em 0;
}

#cart-content {
  padding: 1.5em;
}

#cart-items {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5em 0;
}

#cart-items li {
  background: white;
  padding: 1.2em;
  margin-bottom: 1em;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
  transition: transform 0.2s ease;
}

.cart-item-info {
  flex: 1;
  display: flex;
  flex-direction: column; /* name above price */
  min-width: 0; /* allow shrinking inside flexbox */
}

.cart-item-name {
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 0.3em;
  font-size: 1.05em;
  white-space: normal; 
  overflow-wrap: break-word;
  word-break: break-word; /* extra safety */
}

.cart-item-price {
  color: #718096;
  font-size: 0.9em;
}

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 1em;
}

.remove-btn {
  background: #e53e3e;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 0.5em 1em;
  cursor: pointer;
  font-size: 0.9em;
  font-weight: 500;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.4em;
}

.remove-btn:hover {
  background: #c53030;
}

.cart-summary {
  background: white;
  padding: 1.5em;
  border-radius: 8px;
  margin-bottom: 1.5em;
  border: 1px solid #e2e8f0;
}

.cart-subtotal,
.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5em 0;
}

.cart-subtotal {
  color: #718096;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 0.5em;
  padding-bottom: 1em;
}

.cart-total {
  font-size: 1.2em;
  font-weight: 600;
  color: #2d3748;
}

.price {
  font-weight: 600;
  color: #2c77cc;
}

.cart-actions {
  display: flex;
  flex-direction: column;
  gap: 1em;
}

.checkout-btn {
  background: #48bb78;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 1em 2em;
  font-size: 1.2em;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3);
}

.checkout-btn:hover {
  background: #38a169;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(72, 187, 120, 0.4);
}

.checkout-btn:disabled {
  background: #a0aec0;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.clear-cart-btn {
  background: #718096;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.7em 1.5em;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
}

.clear-cart-btn:hover {
  background: #4a5568;
}

/* Clear Cart Modal - Fixed positioning and visibility */
.modal-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: rgba(0, 0, 0, 0.6) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 999999 !important;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(2px);
}

.modal-overlay.show {
  opacity: 1 !important;
  visibility: visible !important;
}

.modal {
  background: white !important;
  border-radius: 12px;
  padding: 2em;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  transform: scale(0.9);
  transition: transform 0.3s ease;
  position: relative;
  z-index: 1000000;
}

.modal-overlay.show .modal {
  transform: scale(1);
}

.modal h3 {
  margin: 0 0 1em 0;
  color: #2d3748;
  text-align: center;
}

.modal p {
  margin: 0 0 2em 0;
  color: #718096;
  text-align: center;
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  gap: 1em;
  justify-content: center;
}

.modal-btn {
  padding: 0.7em 1.5em;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
  min-width: 80px;
}

.modal-btn.cancel {
  background: #e2e8f0;
  color: #4a5568;
}

.modal-btn.cancel:hover {
  background: #cbd5e0;
}

.modal-btn.confirm {
  background: #e53e3e;
  color: white;
}

.modal-btn.confirm:hover {
  background: #c53030;
}

/* Confirmation Page */
.confirmation-page {
  max-width: 800px;
  margin: 60px auto;
  background: white;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  animation: bounceIn 1s ease;
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.confirmation-header {
  background: #48bb78;
  color: white;
  padding: 3em 2em;
  text-align: center;
}

.success-icon {
  font-size: 4em;
  margin-bottom: 0.5em;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.confirmation-header h1 {
  margin: 0.5em 0;
  font-size: 2.2em;
  font-weight: 600;
}

.confirmation-subtitle {
  font-size: 1.1em;
  opacity: 0.9;
  margin: 0;
}

.order-processing {
  padding: 3em 2em;
  text-align: center;
  background: #f7fafc;
}

.processing-content h3 {
  margin: 1em 0 0.5em 0;
  color: #2d3748;
}

.processing-content p {
  color: #718096;
  margin: 0;
}

.order-complete {
  padding: 2em;
}

.order-summary {
  background: #f7fafc;
  padding: 1.5em;
  border-radius: 8px;
  margin-bottom: 2em;
  border: 1px solid #e2e8f0;
}

.order-summary h3 {
  margin: 0 0 1em 0;
  color: #2d3748;
  display: flex;
  align-items: center;
  gap: 0.5em;
}

.download-section {
  text-align: center;
}

.download-info {
  background: #e6fffa;
  border: 1px solid #81e6d9;
  border-radius: 8px;
  padding: 1.5em;
  margin-bottom: 2em;
}

.download-info h3 {
  color: #2d3748;
  margin: 0 0 1em 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
}

.download-note {
  background: #fef5e7;
  border: 1px solid #f6ad55;
  border-radius: 6px;
  padding: 1em;
  margin-top: 1em;
  color: #744210;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
}

.download-btn {
  background: #2c77cc;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 1em 2.5em;
  font-size: 1.2em;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(44, 119, 204, 0.3);
  margin-bottom: 2em;
}

.download-btn:hover {
  background: #1b5bb3;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(44, 119, 204, 0.4);
}

.download-btn:disabled {
  background: #a0aec0;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.download-instructions {
  background: #f0f4ff;
  border: 1px solid #c5d9ff;
  border-radius: 8px;
  padding: 1.5em;
  text-align: left;
  max-width: 500px;
  margin: 0 auto;
}

.download-instructions h4 {
  margin: 0 0 1em 0;
  color: #2d3748;
}

.download-instructions ul {
  margin: 0;
  padding-left: 1.5em;
  color: #4a5568;
}

.download-instructions li {
  margin-bottom: 0.8em;
  display: flex;
  align-items: center;
  gap: 0.8em;
}

.download-instructions i {
  color: #2c77cc;
  width: 16px;
  text-align: center;
}

.order-error {
  padding: 3em 2em;
  text-align: center;
}

.error-icon {
  font-size: 4em;
  color: #f56565;
  margin-bottom: 1em;
}

.order-error h3 {
  color: #742a2a;
  margin: 0.5em 0;
}

.order-error p {
  color: #744210;
  margin-bottom: 2em;
}

.error-actions {
  display: flex;
  gap: 1em;
  justify-content: center;
  flex-wrap: wrap;
}

.contact-btn {
  background: #e53e3e;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.8em 1.5em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-weight: 500;
  transition: background 0.2s;
  margin-top: 1.5rem;
}

.contact-btn:hover {
  background: #c53030;
}

.confirmation-footer {
  background: #f7fafc;
  padding: 2em;
  border-top: 1px solid #e2e8f0;
}

.session-info {
  text-align: center;
  margin-bottom: 2em;
  padding: 1em;
  background: white;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.session-info p {
  margin: 0 0 0.5em 0;
  color: #2d3748;
}

.session-info small {
  color: #718096;
}

.back-navigation {
  display: flex;
  gap: 1em;
  justify-content: center;
  flex-wrap: wrap;
}

.back-link,
.home-link {
  color: #2c77cc;
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.7em 1.2em;
  border: 1px solid #c5d9ff;
  border-radius: 6px;
  background: white;
  transition: all 0.2s ease;
}

.back-link:hover,
.home-link:hover {
  background: #f0f4ff;
  border-color: #2c77cc;
  transform: translateY(-1px);
}

/* Spinner */
.store-spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid rgba(44, 119, 204, 0.3);
  border-radius: 50%;
  border-top-color: #2c77cc;
  animation: store-spin 1s ease-in-out infinite;
  vertical-align: middle;
}

@keyframes store-spin {
  to {
    transform: rotate(360deg);
  }
}
#products-section {
	padding: 2rem;
}
/* Responsive Design */
@media (max-width: 768px) {
  .store-container {
    border-radius: 3rem 3rem 3rem 3rem;
  }

  .store-header {
    padding: 2em 1.5em;
  }

  .store-header h1 {
    font-size: 2em;
  }

  .products-list {
    grid-template-columns: 1fr;
    gap: 1.5em;
  }

  /* Featured Products Mobile Styles */
  .featured-banner {
    padding: 2rem 1.5rem;
    margin-bottom: 2rem;
    border-radius: 12px;
  }

  .banner-header h2 {
    font-size: 1.5rem;
    flex-direction: column;
    gap: 0.3rem;
  }

  .featured-products-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .featured-ribbon {
    top: 12px;
    right: -25px;
    padding: 6px 30px;
    font-size: 0.75rem;
  }

  .product-secondary-actions {
    flex-direction: column;
    gap: 0.5rem;
  }

  /* Description Modal Mobile Styles */
  .description-modal-content {
    max-width: 95vw;
  }

  .description-modal-header {
    padding: 1rem 1.5rem;
  }

  .description-modal-body {
    padding: 1.5rem;
  }

  .description-modal-footer {
    padding: 1rem 1.5rem;
  }

  .modal-secondary-actions {
    flex-direction: column;
    gap: 0.5rem;
  }

  .filter-options {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 0.5em;
  }

  .filter-btn {
    flex-shrink: 0;
  }

  .confirmation-page {
    margin: 20px;
  }

  .confirmation-header {
    padding: 2em 1.5em;
  }

  .confirmation-header h1 {
    font-size: 1.8em;
  }

  .success-icon {
    font-size: 3em;
  }

  .error-actions {
    flex-direction: column;
    align-items: center;
  }

  .back-navigation {
    flex-direction: column;
    align-items: center;
  }

  .modal {
    margin: 1em;
  }

  .modal-actions {
    flex-direction: column;
  }

  .product-title-row {
    align-items: center;
  }
}

@media (max-width: 480px) {
  #products-section,
  .order-complete {
    padding: 1.5em;
  }

  .product-card {
    margin: 0 0.5em;
  }

  .cart {
    margin: 1em;
  }

  #cart-items li {
    flex-direction: column;
    align-items: flex-start;
    gap: 1em;
  }

  .cart-item-actions {
    align-self: flex-end;
    width: 100%;
    justify-content: flex-end;
  }

  .cart-actions {
    gap: 0.8em;
  }

  /* Featured Products Small Mobile Styles */
  .featured-banner {
    padding: 1.5rem 1rem;
    margin-bottom: 1.5rem;
  }

  .banner-header h2 {
    font-size: 1.3rem;
  }

  .featured-ribbon {
    top: 10px;
    right: -20px;
    padding: 5px 25px;
    font-size: 0.7rem;
  }

  .product-card.featured-product {
    border-width: 2px;
  }

  /* Description Modal Small Mobile Styles */
  .description-modal-content {
    max-height: 90vh;
  }

  .description-modal-header h3 {
    font-size: 1.1rem;
  }

  .product-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .description-content {
    font-size: 0.95rem;
  }

  .store-header h1 {
    font-size: 1.6em;
  }

  .store-description {
    font-size: 1em;
  }
}

/* Additional animations */
.fade-in {
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.slide-down {
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* No products message */
.no-products {
  text-align: center;
  padding: 4em 2em;
  color: #718096;
  background: #f7fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  grid-column: 1 / -1;
}

.no-products i {
  font-size: 4em;
  color: #cbd5e0;
  margin-bottom: 1em;
  display: block;
}

.no-products h3 {
  color: #4a5568;
  margin: 0.5em 0;
}

/* ==========================================
   PREVIEW MODAL STYLES
   ========================================== */

.preview-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
  padding: 1rem;
  box-sizing: border-box;
}

.preview-modal.show {
  opacity: 1;
  visibility: visible;
}

.preview-modal-content {
  background: white;
  border-radius: 16px;
  max-width: 90vw;
  max-height: 90vh;
  width: 800px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
  transform: scale(0.9);
  transition: transform 0.3s ease;
  overflow: hidden;
}

.preview-modal.show .preview-modal-content {
  transform: scale(1);
}

.preview-modal-header {
  background: #2c77cc;
  color: white;
  padding: 1.5em 2em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.preview-modal-header h3 {
  margin: 0;
  font-size: 1.3em;
}

.close-modal-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  cursor: pointer;
  padding: 0.5em;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-size: 1.2em;
}

.close-modal-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.preview-modal-body {
  flex: 1;
  overflow-y: auto;
  min-height: 300px;
  position: relative;
}

.preview-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3em 2em;
  color: #718096;
}

.preview-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e2e8f0;
  border-radius: 50%;
  border-top-color: #2c77cc;
  animation: preview-spin 1s linear infinite;
  margin-bottom: 1em;
}

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

.preview-content {
  padding: 2em;
}

.preview-images {
  display: grid;
  gap: 1em;
  margin-bottom: 1em;
}

.preview-images img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border: 1px solid #e2e8f0;
}

.preview-pdf iframe {
  width: 100%;
  height: 500px;
  border: none;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.preview-video video {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.preview-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3em 2em;
  color: #e53e3e;
}

.preview-error i {
  font-size: 3em;
  margin-bottom: 0.5em;
}

.preview-modal-footer {
  background: #f7fafc;
  padding: 1.5em 2em;
  border-top: 1px solid #e2e8f0;
}

.preview-note {
  margin: 0;
  color: #718096;
  display: flex;
  align-items: center;
  gap: 0.5em;
  font-size: 0.9em;
}

.preview-note i {
  color: #2c77cc;
}

/* ==========================================
   REVIEWS MODAL STYLES
   ========================================== */

.reviews-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
  padding: 1rem;
  box-sizing: border-box;
}

.reviews-modal.show {
  opacity: 1;
  visibility: visible;
}

.reviews-modal-content {
  background: white;
  border-radius: 16px;
  max-width: 90vw;
  max-height: 90vh;
  width: 900px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
  transform: scale(0.9);
  transition: transform 0.3s ease;
  overflow: hidden;
}

.reviews-modal.show .reviews-modal-content {
  transform: scale(1);
}

.reviews-modal-header {
  background: #2c77cc;
  color: white;
  padding: 1.5em 2em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.reviews-modal-header h3 {
  margin: 0;
  font-size: 1.3em;
}

.reviews-modal-body {
  flex: 1;
  overflow-y: auto;
  min-height: 400px;
}

/* Review Stats */
.review-stats {
  background: #f7fafc;
  padding: 2em;
  border-bottom: 1px solid #e2e8f0;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2em;
  align-items: center;
}

.overall-rating {
  text-align: center;
}

.rating-score {
  font-size: 3em;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 0.2em;
}

.rating-stars {
  display: flex;
  justify-content: center;
  gap: 0.2em;
  margin-bottom: 0.5em;
}

.rating-stars i {
  color: #fbbf24;
}

.rating-stars i.empty {
  color: #e2e8f0;
}

.rating-text {
  color: #718096;
  margin: 0;
}

.rating-breakdown {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.rating-bar-row {
  display: grid;
  grid-template-columns: 30px 1fr 40px;
  align-items: center;
  gap: 1em;
  font-size: 0.9em;
}

.rating-bar {
  background: #e2e8f0;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
}

.rating-bar-fill {
  background: #fbbf24;
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.rating-count {
  color: #718096;
  text-align: right;
}

/* Review Filters */
.review-filters {
  display: flex;
  gap: 0.5em;
  padding: 1.5em 2em;
  border-bottom: 1px solid #e2e8f0;
  overflow-x: auto;
}

.review-filter-btn {
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  color: #4a5568;
  padding: 0.6em 1.2em;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.9em;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5em;
  white-space: nowrap;
}

.review-filter-btn:hover {
  border-color: #2c77cc;
  color: #2c77cc;
}

.review-filter-btn.active {
  background: #2c77cc;
  color: white;
  border-color: #2c77cc;
}

/* Reviews List */
.reviews-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3em 2em;
  color: #718096;
}

.reviews-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e2e8f0;
  border-radius: 50%;
  border-top-color: #2c77cc;
  animation: reviews-spin 1s linear infinite;
  margin-bottom: 1em;
}

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

.reviews-list {
  padding: 1.5em 2em;
}

.review-item {
  border-bottom: 1px solid #e2e8f0;
  padding: 1.5em 0;
}

.review-item:last-child {
  border-bottom: none;
}

.review-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1em;
}

.reviewer-info {
  display: flex;
  align-items: center;
  gap: 1em;
}

.reviewer-avatar {
  width: 40px;
  height: 40px;
  background: #2c77cc;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.2em;
}

.reviewer-details h4 {
  margin: 0 0 0.2em 0;
  color: #2d3748;
  font-size: 1.1em;
}

.reviewer-meta {
  display: flex;
  align-items: center;
  gap: 1em;
  color: #718096;
  font-size: 0.9em;
}

.verified-purchase {
  background: #48bb78;
  color: white;
  padding: 0.2em 0.6em;
  border-radius: 12px;
  font-size: 0.8em;
  display: flex;
  align-items: center;
  gap: 0.3em;
}

.review-rating {
  display: flex;
  gap: 0.2em;
}

.review-rating i {
  color: #fbbf24;
}

.review-rating i.empty {
  color: #e2e8f0;
}

.review-content h5 {
  margin: 0 0 0.5em 0;
  color: #2d3748;
  font-size: 1.1em;
}

.review-text {
  color: #4a5568;
  line-height: 1.6;
  margin-bottom: 1em;
}

.review-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}

.helpful-btn,
.not-helpful-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: #2c77cc;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 120px;
  justify-content: center;
}

.helpful-btn:hover,
.not-helpful-btn:hover {
  background: #1e5ba8;
  transform: translateY(-1px);
}

.helpful-btn:disabled,
.not-helpful-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.vote-count {
  font-size: 0.85em;
  opacity: 0.9;
}

/* Vote success modal styling */
#vote-success-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

#vote-success-modal.show {
  opacity: 1;
  visibility: visible;
}

.vote-success-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(2px);
}

.vote-success-content {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s ease;
}

#vote-success-modal.show .vote-success-content {
  transform: scale(1) translateY(0);
}

.vote-success-content.error {
  border-left: 4px solid #e53e3e;
}

.success-animation {
  margin-bottom: 1rem;
}

.success-checkmark {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: block;
  stroke-width: 2;
  stroke: #48bb78;
  stroke-miterlimit: 10;
  margin: 0 auto 1rem;
  position: relative;
  background: #f0fff4;
  border: 2px solid #48bb78;
}

.success-checkmark .check-icon {
  width: 60px;
  height: 60px;
  position: relative;
  border-radius: 50%;
  display: block;
  stroke-width: 2;
  stroke: #48bb78;
  stroke-miterlimit: 10;
}

.success-checkmark .icon-line {
  height: 3px;
  background-color: #48bb78;
  display: block;
  border-radius: 2px;
  position: absolute;
  z-index: 10;
}

.success-checkmark .icon-line.line-tip {
  top: 29px;
  left: 18px;
  width: 10px;
  transform: rotate(45deg);
  animation: checkmark-tip 0.75s 0.3s ease-in-out forwards;
  opacity: 0;
}

.success-checkmark .icon-line.line-long {
  top: 25px;
  right: 12px;
  width: 20px;
  transform: rotate(-45deg);
  animation: checkmark-long 0.75s 0.6s ease-in-out forwards;
  opacity: 0;
}

.success-checkmark .icon-circle {
  position: absolute;
  top: -2px;
  left: -2px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid #48bb78;
  animation: checkmark-circle 0.6s ease-in-out forwards;
}

.error-animation {
  margin-bottom: 1rem;
}

.error-icon {
  font-size: 3rem;
  color: #e53e3e;
  animation: errorShake 0.5s ease-in-out;
}

.success-text h3 {
  color: #2d3748;
  margin-bottom: 0.5rem;
}

.success-text p {
  color: #4a5568;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.success-close-btn {
  background: #2c77cc;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.success-close-btn:hover {
  background: #1e5ba8;
  transform: translateY(-1px);
}

.success-close-btn.error {
  background: #e53e3e;
}

.success-close-btn.error:hover {
  background: #c53030;
}

/* Submit review button - prevent shape change on mobile */
#submit-review {
  min-height: 44px; /* Ensure consistent height */
  min-width: 120px; /* Ensure consistent width */
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

#submit-review .btn-text,
#submit-review .btn-spinner {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

#submit-review .btn-spinner {
  display: none;
}

/* Animations */
@keyframes checkmark-circle {
  0% {
    stroke-dasharray: 0 181;
    stroke-dashoffset: 0;
  }
  100% {
    stroke-dasharray: 181 181;
    stroke-dashoffset: 0;
  }
}

@keyframes checkmark-tip {
  0% {
    width: 0;
    left: 18px;
    top: 29px;
    opacity: 0;
  }
  54% {
    width: 0;
    left: 18px;
    top: 29px;
    opacity: 1;
  }
  70% {
    width: 10px;
    left: 18px;
    top: 29px;
    opacity: 1;
  }
  100% {
    width: 10px;
    left: 18px;
    top: 29px;
    opacity: 1;
  }
}

@keyframes checkmark-long {
  0% {
    width: 0;
    right: 12px;
    top: 25px;
    opacity: 0;
  }
  65% {
    width: 0;
    right: 12px;
    top: 25px;
    opacity: 1;
  }
  84% {
    width: 20px;
    right: 12px;
    top: 25px;
    opacity: 1;
  }
  100% {
    width: 20px;
    right: 12px;
    top: 25px;
    opacity: 1;
  }
}

@keyframes errorShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.reviews-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3em 2em;
  color: #e53e3e;
}

.reviews-error i {
  font-size: 3em;
  margin-bottom: 0.5em;
}

.no-reviews {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3em 2em;
  color: #718096;
}

.no-reviews i {
  font-size: 3em;
  margin-bottom: 0.5em;
  color: #cbd5e0;
}

.reviews-pagination {
  text-align: center;
  padding: 1em 2em;
  border-top: 1px solid #e2e8f0;
}

.load-more-btn {
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  color: #4a5568;
  padding: 0.8em 1.5em;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
}

.load-more-btn:hover {
  background: #e2e8f0;
}

.reviews-modal-footer {
  background: #f7fafc;
  padding: 1.5em 2em;
  border-top: 1px solid #e2e8f0;
  text-align: center;
}

.write-review-btn {
  background: #2c77cc;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.8em 1.5em;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  transition: all 0.2s ease;
}
button.dropdown-remove-btn {
transition: all 0.2s ease !important;
}

.write-review-btn:hover {
  background: #1b5bb3;
}

/* ==========================================
   WRITE REVIEW MODAL STYLES
   ========================================== */

.write-review-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
  padding: 1rem;
  box-sizing: border-box;
}

.write-review-modal.show {
  opacity: 1;
  visibility: visible;
}

.write-review-modal-content {
  background: white;
  border-radius: 16px;
  max-width: 90vw;
  max-height: 90vh;
  width: 600px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
  transform: scale(0.9);
  transition: transform 0.3s ease;
  overflow: hidden;
}

.write-review-modal.show .write-review-modal-content {
  transform: scale(1);
}

.write-review-modal-header {
  background: #2c77cc;
  color: white;
  padding: 1.5em 2em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.write-review-modal-header h3 {
  margin: 0;
  font-size: 1.3em;
}

.write-review-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 2em;
}

.form-group {
  margin-bottom: 1.5em;
}

.form-group label {
  display: block;
  margin-bottom: 0.5em;
  color: #2d3748;
  font-weight: 600;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8em;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1em;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #2c77cc;
  box-shadow: 0 0 0 3px rgba(44, 119, 204, 0.1);
}

.form-group small {
  color: #718096;
  font-size: 0.85em;
  margin-top: 0.3em;
  display: block;
}

.rating-input {
  display: flex;
  align-items: center;
  gap: 1em;
}

.star-rating {
  display: flex;
  gap: 0.2em;
}

.star-rating i {
  font-size: 1.8em;
  color: #e2e8f0;
  cursor: pointer;
  transition: color 0.2s;
}

.star-rating i:hover,
.star-rating i.selected {
  color: #fbbf24;
}

.write-review-modal-footer {
  background: #f7fafc;
  padding: 1.5em 2em;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
  gap: 1em;
}

.cancel-review-btn {
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  color: #4a5568;
  padding: 0.8em 1.5em;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cancel-review-btn:hover {
  background: #e2e8f0;
}

.submit-review-btn {
  background: #48bb78;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.8em 1.5em;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5em;
  transition: all 0.2s ease;
  position: relative;
}

.submit-review-btn:hover {
  background: #38a169;
}

.submit-review-btn:disabled {
  background: #a0aec0;
  cursor: not-allowed;
}

.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: btn-spin 1s linear infinite;
}

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

/* Product Card Enhancements for New Features */
.product-actions {
  display: flex;
  flex-direction: column;
  gap: 0.8em;
  margin-top: 1em;
}

.product-secondary-actions {
  display: flex;
  gap: 0.5em;
}

.preview-btn,
.reviews-btn {
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  color: #4a5568;
  padding: 0.5em 1em;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9em;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.4em;
  flex: 1;
  justify-content: center;
}

.preview-btn:hover,
.reviews-btn:hover {
  background: #e2e8f0;
  border-color: #2c77cc;
  color: #2c77cc;
}

.preview-btn i,
.reviews-btn i {
  font-size: 0.9em;
}

/* Reviews Modal Styles */
.reviews-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
  padding: 1rem;
  box-sizing: border-box;
}

.reviews-modal.show {
  opacity: 1;
  visibility: visible;
}

.reviews-modal-content {
  background: white;
  border-radius: 16px;
  max-width: 90vw;
  max-height: 90vh;
  width: 900px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
  transform: scale(0.9);
  transition: transform 0.3s ease;
  overflow: hidden;
}

.reviews-modal.show .reviews-modal-content {
  transform: scale(1);
}

.reviews-modal-header {
  background: #2c77cc;
  color: white;
  padding: 1.5em 2em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.reviews-modal-header h3 {
  margin: 0;
  font-size: 1.3em;
}

.reviews-modal-body {
  flex: 1;
  overflow-y: auto;
  min-height: 300px;
  position: relative;
}

.write-review-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
  padding: 1rem;
  box-sizing: border-box;
}

.write-review-modal.show {
  opacity: 1;
  visibility: visible;
}

.write-review-modal-content {
  background: white;
  border-radius: 16px;
  max-width: 90vw;
  max-height: 90vh;
  width: 600px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
  transform: scale(0.9);
  transition: transform 0.3s ease;
  overflow: hidden;
}

.write-review-modal.show .write-review-modal-content {
  transform: scale(1);
}

.write-review-modal-header {
  background: #2c77cc;
  color: white;
  padding: 1.5em 2em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.write-review-modal-header h3 {
  margin: 0;
  font-size: 1.3em;
}

.write-review-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 2em;
  position: relative;
}

.write-review-modal-footer {
  padding: 1.5em 2em;
  border-top: 1px solid #e2e8f0;
  display: flex;
  gap: 1em;
  justify-content: flex-end;
}

/* Mobile Responsive for New Features */
@media (max-width: 768px) {
  .store-title-section {
    flex-direction: column;
    gap: 1.5em;
    align-items: center;
    text-align: center;
  }
  
  .title-content {
    width: 100%;
    order: 1;
  }
  
  .cart-dropdown-container {
    order: 2;
  }
  
  .cart-dropdown-menu {
    width: 320px;
    right: 0;
    left: auto;
    max-height: 70vh;
  }
  
  /* Fix cart item layout on mobile */
  .cart-dropdown-list li {
    align-items: flex-start;
    padding: 1em;
  }
  
  .cart-dropdown-list li > div:first-child {
    flex: 1;
    min-width: 0;
    margin-right: 0.5em;
  }
  
  .cart-dropdown-list li button {
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 0.2em;
  }
  
  .preview-modal-content,
  .reviews-modal-content,
  .write-review-modal-content {
    width: 95vw;
    max-height: 95vh;
  }
  
  .review-stats {
    grid-template-columns: 1fr;
    gap: 1em;
    text-align: center;
  }
  
  .review-filters {
    padding: 1em;
  }
  
  .review-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5em;
  }
  
  .reviewer-meta {
    flex-wrap: wrap;
  }
  
  .write-review-modal-footer {
    flex-direction: column;
  }
  
  .product-secondary-actions {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .cart-dropdown-menu {
    width: calc(100vw - 20px);
    max-height: 60vh;
    position: fixed;
    top: auto;
    bottom: 20px;
    margin: 0rem 1rem;
  }
  
  .store-header {
    padding: 2em 1.5em;
  }
  
  .store-title-section {
    gap: 1.5em;
  }
  
  .cart-dropdown-btn {
    padding: 0.6em 1em;
    font-size: 0.9em;
  }
  
  /* Full-screen modals on mobile */
  .preview-modal,
  .reviews-modal,
  .write-review-modal {
    padding: 0;
  }
  
  .preview-modal-content,
  .reviews-modal-content,
  .write-review-modal-content {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    max-height: 100vh;
    max-width: 100vw;
    margin: 0;
    display: flex;
    flex-direction: column;
  }
  
  .preview-modal-body,
  .reviews-modal-body,
  .write-review-modal-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1rem;
  }
  
  /* Reviews modal specific mobile fixes */
  .review-stats {
    grid-template-columns: 1fr;
    gap: 1em;
    margin: 0;
  }
  
  .review-filters {
    margin: 0;
    gap: 0.3em;
    flex-wrap: wrap;
  }
  
  .review-filter-btn {
    flex: 1;
    min-width: 120px;
  }
}
