/* Sastapk E-commerce Styles */

:root {
  --primary-color: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #3b82f6;
  --secondary-color: #f97316;
  --accent-color: #10b981;
  --danger-color: #ef4444;
  --text-dark: #1f2937;
  --text-light: #6b7280;
  --text-lighter: #9ca3af;
  --bg-light: #f9fafb;
  --bg-white: #ffffff;
  --border-color: #e5e7eb;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-light);
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  cursor: pointer;
  border: none;
  outline: none;
  font-family: inherit;
  transition: var(--transition);
}

/* Container */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.header {
  background: var(--bg-white);
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
}

.logo {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo span {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Search Bar */
.search-bar {
  flex: 1;
  max-width: 600px;
  margin: 0 40px;
  position: relative;
}

.search-bar input {
  width: 100%;
  padding: 12px 45px 12px 20px;
  border: 2px solid var(--border-color);
  border-radius: 50px;
  font-size: 15px;
  transition: var(--transition);
}

.search-bar input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-bar button {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary-color);
  color: white;
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 14px;
}

.search-bar button:hover {
  background: var(--primary-dark);
}

/* Navigation */
.nav-icons {
  display: flex;
  align-items: center;
  gap: 25px;
}

.nav-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--text-light);
  font-size: 13px;
  cursor: pointer;
  position: relative;
}

.nav-icon:hover {
  color: var(--primary-color);
}

.nav-icon svg {
  width: 24px;
  height: 24px;
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--danger-color);
  color: white;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 600;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 60px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="rgba(255,255,255,0.05)"/></svg>');
  background-size: 50px 50px;
  animation: float 20s linear infinite;
}

@keyframes float {
  0% { transform: translateX(0) translateY(0); }
  100% { transform: translateX(50px) translateY(50px); }
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 48px;
  margin-bottom: 15px;
  font-weight: 700;
}

.hero p {
  font-size: 18px;
  opacity: 0.9;
  margin-bottom: 25px;
}

.hero-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.btn {
  padding: 12px 30px;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: var(--bg-white);
  color: var(--primary-color);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: transparent;
  color: white;
  border: 2px solid white;
}

.btn-secondary:hover {
  background: white;
  color: var(--primary-color);
}

/* Featured Products Carousel */
.featured-section {
  padding: 50px 20px;
  background: var(--bg-white);
}

.section-title {
  font-size: 32px;
  margin-bottom: 30px;
  text-align: center;
  color: var(--text-dark);
}

.carousel-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease;
}

.carousel-item {
  min-width: 100%;
  padding: 0 10px;
}

.featured-card {
  background: var(--bg-light);
  border-radius: 20px;
  padding: 30px;
  display: flex;
  gap: 40px;
  align-items: center;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.featured-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-5px);
}

.featured-image {
  flex: 0 0 400px;
  height: 300px;
  background: var(--bg-white);
  border-radius: 15px;
  overflow: hidden;
}

.featured-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.featured-info {
  flex: 1;
}

.featured-badge {
  background: linear-gradient(135deg, var(--secondary-color), var(--danger-color));
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 15px;
}

.featured-info h3 {
  font-size: 28px;
  margin-bottom: 10px;
  color: var(--text-dark);
}

.featured-price {
  font-size: 32px;
  color: var(--primary-color);
  font-weight: 700;
  margin-bottom: 10px;
}

.featured-price .original {
  font-size: 20px;
  color: var(--text-lighter);
  text-decoration: line-through;
  margin-left: 10px;
}

.featured-description {
  color: var(--text-light);
  margin-bottom: 20px;
  line-height: 1.8;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: var(--bg-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  z-index: 10;
}

.carousel-btn:hover {
  background: var(--primary-color);
  color: white;
}

.carousel-btn.prev {
  left: 10px;
}

.carousel-btn.next {
  right: 10px;
}

/* Categories */
.categories-section {
  padding: 50px 20px;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.category-card {
  background: var(--bg-white);
  padding: 25px 15px;
  border-radius: 15px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  cursor: pointer;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.category-icon {
  font-size: 40px;
  margin-bottom: 10px;
}

.category-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
}

.category-count {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 5px;
}

/* Products Grid */
.products-section {
  padding: 50px 20px;
  background: var(--bg-white);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
  max-width: 1200px;
  margin: 0 auto;
}

.product-card {
  background: var(--bg-white);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

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

.product-image {
  position: relative;
  height: 250px;
  background: var(--bg-light);
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 20px;
  transition: var(--transition);
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--danger-color);
  color: white;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.product-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  transition: var(--transition);
}

.product-card:hover .product-actions {
  opacity: 1;
}

.action-btn {
  width: 35px;
  height: 35px;
  background: var(--bg-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.action-btn:hover {
  background: var(--primary-color);
  color: white;
}

.product-info {
  padding: 20px;
}

.product-category {
  font-size: 12px;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.product-name {
  font-size: 16px;
  font-weight: 600;
  margin: 8px 0;
  color: var(--text-dark);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 10px;
}

.stars {
  color: #fbbf24;
  font-size: 14px;
}

.rating-count {
  font-size: 12px;
  color: var(--text-light);
}

.product-price {
  display: flex;
  align-items: center;
  gap: 10px;
}

.current-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-color);
}

.original-price {
  font-size: 14px;
  color: var(--text-lighter);
  text-decoration: line-through;
}

.product-buttons {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.product-buttons .btn {
  flex: 1;
  padding: 10px;
  font-size: 14px;
}

.btn-cart {
  background: var(--primary-color);
  color: white;
  border: 2px solid var(--primary-color);
}

.btn-cart:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-buy {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-buy:hover {
  background: var(--primary-color);
  color: white;
}

/* Trust Badges */
.trust-section {
  padding: 50px 20px;
  background: var(--bg-light);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.trust-item {
  text-align: center;
  padding: 30px;
}

.trust-icon {
  font-size: 48px;
  margin-bottom: 15px;
}

.trust-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-dark);
}

.trust-desc {
  font-size: 14px;
  color: var(--text-light);
}

/* Footer */
.footer {
  background: var(--text-dark);
  color: white;
  padding: 60px 20px 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-section h4 {
  font-size: 18px;
  margin-bottom: 20px;
  color: white;
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: 10px;
}

.footer-section a {
  color: #9ca3af;
  font-size: 14px;
}

.footer-section a:hover {
  color: white;
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  margin-top: 40px;
  border-top: 1px solid #374151;
}

.footer-bottom p {
  color: #9ca3af;
  font-size: 14px;
}

/* Page Specific Styles */
.page-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 40px 20px;
  text-align: center;
}

.page-header h1 {
  font-size: 36px;
  margin-bottom: 10px;
}

.breadcrumb {
  font-size: 14px;
  opacity: 0.9;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

/* Product Detail Page */
.product-detail {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}

.product-gallery {
  background: var(--bg-white);
  border-radius: 15px;
  padding: 30px;
  box-shadow: var(--shadow-md);
}

.main-image {
  width: 100%;
  height: 500px;
  background: var(--bg-light);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 20px;
}

.main-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-details {
  background: var(--bg-white);
  border-radius: 15px;
  padding: 30px;
  box-shadow: var(--shadow-md);
}

.product-details h1 {
  font-size: 32px;
  margin-bottom: 15px;
  color: var(--text-dark);
}

.price-section {
  margin-bottom: 20px;
}

.price-section .current-price {
  font-size: 36px;
  font-weight: 700;
  color: var(--primary-color);
}

.price-section .original-price {
  font-size: 24px;
}

.discount-badge {
  background: var(--danger-color);
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  margin-left: 15px;
}

.quantity-selector {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 25px 0;
}

.qty-btn {
  width: 40px;
  height: 40px;
  background: var(--bg-light);
  border-radius: 8px;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-btn:hover {
  background: var(--primary-color);
  color: white;
}

.qty-input {
  width: 60px;
  height: 40px;
  text-align: center;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 16px;
}

.action-buttons {
  display: flex;
  gap: 15px;
  margin-top: 25px;
}

.action-buttons .btn {
  flex: 1;
  padding: 15px;
  font-size: 16px;
}

.features-list {
  margin-top: 25px;
}

.features-list h3 {
  font-size: 18px;
  margin-bottom: 15px;
  color: var(--text-dark);
}

.features-list ul {
  list-style: none;
}

.features-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 10px;
}

.features-list li:before {
  content: '✓';
  color: var(--accent-color);
  font-weight: bold;
}

/* Cart Page */
.cart-container {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
}

.cart-items {
  background: var(--bg-white);
  border-radius: 15px;
  padding: 30px;
  box-shadow: var(--shadow-md);
}

.cart-item {
  display: flex;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-color);
}

.cart-item-image {
  width: 120px;
  height: 120px;
  background: var(--bg-light);
  border-radius: 10px;
  overflow: hidden;
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cart-item-info {
  flex: 1;
}

.cart-item-name {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-dark);
}

.cart-item-price {
  font-size: 20px;
  color: var(--primary-color);
  font-weight: 700;
}

.remove-item {
  color: var(--danger-color);
  font-size: 14px;
  background: none;
  padding: 5px 10px;
  margin-top: 10px;
}

.remove-item:hover {
  text-decoration: underline;
}

.cart-summary {
  background: var(--bg-white);
  border-radius: 15px;
  padding: 30px;
  box-shadow: var(--shadow-md);
  height: fit-content;
}

.cart-summary h2 {
  font-size: 24px;
  margin-bottom: 20px;
  color: var(--text-dark);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.summary-row.total {
  border-top: 2px solid var(--text-dark);
  margin-top: 15px;
  padding-top: 20px;
  font-size: 20px;
  font-weight: 700;
}

.checkout-btn {
  width: 100%;
  margin-top: 25px;
  padding: 15px;
  font-size: 16px;
}

/* Checkout Page */
.checkout-container {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

.payment-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 30px;
}

.payment-card {
  background: var(--bg-white);
  border-radius: 15px;
  padding: 30px;
  box-shadow: var(--shadow-md);
  border: 2px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition);
}

.payment-card.selected {
  border-color: var(--primary-color);
  background: rgba(37, 99, 235, 0.05);
}

.payment-logo {
  height: 60px;
  margin-bottom: 15px;
}

.payment-name {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.payment-desc {
  font-size: 14px;
  color: var(--text-light);
}

.order-form {
  background: var(--bg-white);
  border-radius: 15px;
  padding: 30px;
  box-shadow: var(--shadow-md);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-dark);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary-color);
  outline: none;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.place-order-btn {
  width: 100%;
  padding: 15px;
  font-size: 18px;
  margin-top: 20px;
}

/* Policy Pages */
.policy-content {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 20px;
}

.policy-section {
  background: var(--bg-white);
  border-radius: 15px;
  padding: 40px;
  box-shadow: var(--shadow-md);
  line-height: 1.8;
}

.policy-section h2 {
  font-size: 24px;
  margin-top: 30px;
  margin-bottom: 15px;
  color: var(--text-dark);
}

.policy-section h3 {
  font-size: 20px;
  margin-top: 25px;
  margin-bottom: 12px;
  color: var(--text-dark);
}

.policy-section p {
  margin-bottom: 15px;
  color: var(--text-light);
}

.policy-section ul {
  margin-left: 30px;
  margin-bottom: 15px;
}

.policy-section li {
  margin-bottom: 8px;
  color: var(--text-light);
}

/* Empty Cart */
.empty-cart {
  text-align: center;
  padding: 60px 20px;
}

.empty-cart-icon {
  font-size: 80px;
  margin-bottom: 20px;
}

.empty-cart h2 {
  font-size: 28px;
  margin-bottom: 10px;
  color: var(--text-dark);
}

.empty-cart p {
  color: var(--text-light);
  margin-bottom: 25px;
}

/* Success Message */
.success-message {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid var(--accent-color);
  color: var(--accent-color);
  padding: 15px 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Responsive */
@media (max-width: 1024px) {
  .featured-card {
    flex-direction: column;
  }
  
  .featured-image {
    flex: none;
    width: 100%;
    height: 250px;
  }
  
  .product-detail {
    grid-template-columns: 1fr;
  }
  
  .cart-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 15px;
  }
  
  .search-bar {
    margin: 0;
    max-width: 100%;
    width: 100%;
  }
  
  .nav-icons {
    width: 100%;
    justify-content: space-around;
  }
  
  .hero h1 {
    font-size: 32px;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
  
  .payment-methods {
    grid-template-columns: 1fr;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 28px;
  }
  
  .products-grid {
    grid-template-columns: 1fr;
  }
  
  .cart-item {
    flex-direction: column;
    align-items: center;
  }
  
  .cart-item-image {
    width: 100%;
    height: 150px;
  }
}
