/* Enhanced modern styling for KingBook.shop */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  background: linear-gradient(135deg, #f5f7fa 0%, #e8eef5 100%);
  color: #1a202c;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.3s ease;
}

/* Header & Navigation */
header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(37, 99, 235, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.navbar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.6rem;
  font-weight: 800;
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.logo span {
  background: linear-gradient(135deg, #7c3aed 0%, #2563eb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  gap: 0.5rem;
  font-size: 0.95rem;
  align-items: center;
}

.nav-links a {
  padding: 0.6rem 1rem;
  border-radius: 12px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.nav-links a:hover {
  background: linear-gradient(135deg, #eff6ff 0%, #e0e7ff 100%);
  transform: translateY(-1px);
}

.cart-link {
  background: linear-gradient(135deg, #dbeafe 0%, #e0e7ff 100%);
  font-weight: 600;
  color: #2563eb;
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  padding: 0.65rem 1.5rem;
  border-radius: 12px;
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
  color: #ffffff;
  padding: 0.65rem 1.5rem;
  border-radius: 12px;
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(107, 114, 128, 0.4);
}

.btn-danger {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: #ffffff;
  padding: 0.65rem 1.5rem;
  border-radius: 12px;
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
}

/* Main Content */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* Hero Section */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
  padding: 3rem 0 2rem;
}

.hero h1 {
  font-size: 3rem;
  line-height: 1.1;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #1a202c 0%, #2563eb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
}

.hero p {
  color: #4b5563;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.tag {
  font-size: 0.8rem;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  background: linear-gradient(135deg, #dbeafe 0%, #e0e7ff 100%);
  color: #1d4ed8;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.hero-cta a:not(.btn-primary) {
  color: #2563eb;
  font-weight: 600;
  padding: 0.65rem 1rem;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.hero-cta a:not(.btn-primary):hover {
  background: rgba(37, 99, 235, 0.1);
}

.hero img {
  width: 100%;
  border-radius: 20px;
  object-fit: cover;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.2);
  transition: transform 0.3s ease;
}

.hero img:hover {
  transform: scale(1.02);
}

/* Sections */
.section {
  margin-top: 4rem;
}

.section h2 {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  font-weight: 700;
  color: #1a202c;
}

.section p {
  color: #4b5563;
  font-size: 1.05rem;
}

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

.product-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 1rem;
  border: 1px solid rgba(37, 99, 235, 0.1);
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(37, 99, 235, 0.15);
  border-color: rgba(37, 99, 235, 0.3);
}

.product-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 1rem;
}

.product-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
  color: #1a202c;
}

.product-card p {
  font-size: 0.9rem;
  color: #6b7280;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid #f3f4f6;
}

.price {
  font-weight: 700;
  font-size: 1.3rem;
  color: #2563eb;
}

/* Filter Bar */
.filter-bar {
  display: flex;
  gap: 0.75rem;
  margin: 2rem 0;
  flex-wrap: wrap;
  padding: 1rem;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.filter-btn {
  padding: 0.65rem 1.5rem;
  border-radius: 12px;
  border: 2px solid #e5e7eb;
  background: #ffffff;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.filter-btn:hover {
  border-color: #2563eb;
  color: #2563eb;
  transform: translateY(-2px);
}

.filter-btn.active {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Auth Container */
.auth-container {
  max-width: 500px;
  margin: 2rem auto;
}

.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: -1px;
  position: relative;
  z-index: 1;
}

.auth-tab {
  flex: 1;
  padding: 1rem 2rem;
  border: none;
  background: #f3f4f6;
  color: #6b7280;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 20px 20px 0 0;
  border: 1px solid rgba(37, 99, 235, 0.1);
  border-bottom: none;
}

.auth-tab:first-child {
  border-right: none;
}

.auth-tab.active {
  background: #ffffff;
  color: #2563eb;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
}

.auth-tab:hover:not(.active) {
  background: #e5e7eb;
  color: #374151;
}

.auth-switch {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
  color: #6b7280;
  font-size: 0.95rem;
}

.auth-switch a {
  color: #2563eb;
  font-weight: 700;
  text-decoration: none;
}

.auth-switch a:hover {
  text-decoration: underline;
}

/* Forms */
.form-card {
  max-width: 500px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 0 0 20px 20px;
  padding: 2.5rem 2rem;
  border: 1px solid rgba(37, 99, 235, 0.1);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  animation: fadeIn 0.4s ease-out;
}

.auth-container .form-card {
  border-radius: 0 0 20px 20px;
}

.form-card h1 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
  color: #1a202c;
}

.form-card p {
  font-size: 0.95rem;
  color: #6b7280;
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: #374151;
  font-weight: 600;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 2px solid #e5e7eb;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  background: #f9fafb;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #9ca3af;
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #2563eb;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.checkbox-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.85rem;
  color: #4b5563;
  margin-bottom: 1rem;
}

.checkbox-row input {
  margin-top: 0.2rem;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.checkbox-row a {
  color: #2563eb;
  font-weight: 600;
}

/* Page Headers */
.page-header {
  margin-bottom: 2rem;
  padding: 2rem;
  background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
  border-radius: 20px;
  border: 1px solid rgba(37, 99, 235, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.page-header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #1a202c 0%, #2563eb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-header p {
  font-size: 1.05rem;
  color: #6b7280;
}

/* Legal Sections */
.legal-section {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.legal-section h2 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
  font-weight: 700;
  color: #1a202c;
}

.legal-section p,
.legal-section ul {
  font-size: 0.95rem;
  color: #4b5563;
  line-height: 1.7;
}

.legal-section ul {
  list-style: disc;
  margin-left: 1.5rem;
  margin-top: 0.5rem;
}

.legal-section ul li {
  margin-bottom: 0.5rem;
}

/* Cart Page */
.cart-item {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 1.5rem;
  background: #ffffff;
  border-radius: 16px;
  padding: 1.5rem;
  border: 1px solid rgba(37, 99, 235, 0.1);
  margin-bottom: 1.5rem;
  align-items: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

.cart-item:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.cart-item img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 12px;
}

.cart-item-details h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
  color: #1a202c;
}

.cart-item-details p {
  font-size: 0.9rem;
  color: #6b7280;
  margin-bottom: 0.75rem;
}

.cart-item-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-end;
}

.quantity-control {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 0.5rem;
  background: #f9fafb;
}

.quantity-control button {
  width: 32px;
  height: 32px;
  border: none;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.quantity-control button:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.quantity-control span {
  min-width: 35px;
  text-align: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: #1a202c;
}

.remove-btn {
  padding: 0.5rem 1rem;
  border: none;
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  color: #dc2626;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.remove-btn:hover {
  background: linear-gradient(135deg, #fecaca 0%, #fca5a5 100%);
  transform: translateY(-2px);
}

.cart-summary {
  background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
  border-radius: 20px;
  padding: 2rem;
  border: 1px solid rgba(37, 99, 235, 0.1);
  margin-top: 2rem;
  max-width: 450px;
  margin-left: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: 1rem;
  color: #4b5563;
}

.summary-row.total {
  font-size: 1.5rem;
  font-weight: 800;
  padding-top: 1rem;
  border-top: 2px solid #e5e7eb;
  margin-top: 1rem;
  color: #1a202c;
}

/* Account Page */
.account-container {
  display: grid;
  gap: 2rem;
  max-width: 800px;
}

.account-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 2rem;
  border: 1px solid rgba(37, 99, 235, 0.1);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.account-card h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
  color: #1a202c;
}

.info-row {
  display: flex;
  padding: 1rem 0;
  border-bottom: 1px solid #f3f4f6;
}

.info-row:last-child {
  border-bottom: none;
}

.info-row .label {
  font-weight: 700;
  min-width: 160px;
  color: #374151;
}

.info-row span:last-child {
  color: #6b7280;
}

/* Footer */
footer {
  border-top: 1px solid rgba(37, 99, 235, 0.1);
  background: #ffffff;
  margin-top: 4rem;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem;
  font-size: 0.9rem;
  color: #6b7280;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-contact {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
}

.footer-contact a {
  color: #2563eb;
  font-weight: 600;
  transition: color 0.3s ease;
}

.footer-contact a:hover {
  color: #1d4ed8;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: #2563eb;
  font-weight: 600;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* Contact Info Section */
.contact-info {
  display: grid;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.contact-item {
  background: #ffffff;
  padding: 1.5rem;
  border-radius: 16px;
  border: 1px solid rgba(37, 99, 235, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.3s ease;
}

.contact-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.contact-item strong {
  color: #1a202c;
  font-size: 1rem;
  min-width: 120px;
}

.contact-item a {
  color: #2563eb;
  font-weight: 600;
  transition: color 0.3s ease;
}

.contact-item a:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.contact-item span {
  color: #4b5563;
}

/* Responsive */
@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .cart-item {
    grid-template-columns: 1fr;
  }
  
  .cart-item-actions {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  
  .cart-summary {
    max-width: 100%;
  }
  
  .navbar {
    flex-wrap: wrap;
  }
  
  .nav-links {
    flex-wrap: wrap;
  }
  
  .page-header h1 {
    font-size: 1.8rem;
  }
  
  .product-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-card,
.cart-item,
.account-card,
.legal-section {
  animation: fadeIn 0.5s ease-out;
}
