/**
 * Price Calculator & Services Page Shopping Cart Styles
 * Supports both Light and Dark modes with premium button designs
 */

:root {
  --calc-bg: #ffffff;
  --calc-text: #1a1a1a;
  --calc-border: #e2e8f0;
  --calc-item-bg: #f8fafc;
  --calc-summary-bg: #f1f5f9;
  --calc-header-bg: #ffffff;
}

body.dark-mode {
  --calc-bg: #1a1f35;
  --calc-text: #e8eaed;
  --calc-border: #2d3748;
  --calc-item-bg: #2a2f45;
  --calc-summary-bg: #0f1419;
  --calc-header-bg: #1a1f35;
}

/* Desktop Layout */
.price-calculator {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 30px;
  align-items: start;
}

.services-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
  /* Preloader bitene kadar gizli */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.services-list.services-visible {
  opacity: 1;
  visibility: visible;
}

/* --- PREMIUM SERVICE CARD --- */
.service-card {
  background: var(--calc-bg);
  border: 1px solid var(--calc-border);
  padding: 30px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  border-color: #ea580c;
}

.service-icon {
  font-size: 2.5rem;
  color: #ea580c;
  margin-bottom: 20px;
  filter: drop-shadow(0 5px 10px rgba(234, 88, 12, 0.2));
}

.service-name {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--calc-text);
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.service-description {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.6;
  flex-grow: 1;
}

.service-features {
  list-style: none;
  padding: 0;
  margin: 0 0 25px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.service-features li {
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
}

.service-features li i {
  color: #10b981;
  font-size: 12px;
}

/* --- PREMIUM ADD BUTTON --- */
.add-service-btn {
  margin-top: auto;
  padding: 14px 20px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid #ea580c;
  background: transparent;
  color: #ea580c;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.add-service-btn i {
  font-size: 1.1rem;
  transition: transform 0.3s ease;
}

.add-service-btn:hover {
  background: #ea580c;
  color: white !important;
  box-shadow: 0 8px 20px rgba(234, 88, 12, 0.3);
}

.add-service-btn:hover i {
  transform: rotate(90deg);
}

.add-service-btn.added {
  background: #10b981;
  border-color: #10b981;
  color: white !important;
  cursor: default;
}

.add-service-btn.added:hover {
  transform: none;
  box-shadow: none;
}

/* --- SHOPPING CART --- */
.shopping-cart {
  background: var(--calc-bg);
  border: 1px solid var(--calc-border);
  border-radius: 20px;
  padding: 25px;
  position: sticky;
  top: 100px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.08);
  color: var(--calc-text);
  transition: all 0.3s ease;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid #ea580c;
}

.cart-header h3 {
  font-size: 1.3rem;
  font-weight: 800;
  color: #ea580c;
}

.item-count {
  background: #ea580c;
  color: white !important;
  padding: 4px 12px;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 800;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px;
  background: var(--calc-item-bg);
  border-radius: 12px;
  margin-bottom: 12px;
  border: 1px solid var(--calc-border);
}

.cart-item h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--calc-text);
}

.remove-item-btn {
  color: #ef4444;
  opacity: 0.6;
  transition: all 0.2s;
}

.remove-item-btn:hover {
  opacity: 1;
  transform: scale(1.2);
}

.cart-summary {
  background: var(--calc-summary-bg);
  padding: 20px;
  border-radius: 15px;
  margin-bottom: 20px;
  border: 1px solid var(--calc-border);
}

.cart-summary-item span#total-services {
  font-weight: 900;
  color: #ea580c !important;
  font-size: 1.4rem;
}

.get-quote-btn {
  width: 100%;
  background: #ea580c;
  color: white !important;
  border: none;
  padding: 18px;
  border-radius: 15px;
  font-weight: 800;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s;
}

.get-quote-btn:hover:not(:disabled) {
  background: #c2410c;
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(234, 88, 12, 0.4);
}

/* Mobile Adjustments */
@media (max-width: 992px) {
  .price-calculator { grid-template-columns: 1fr; padding-bottom: 120px; }
  
  .shopping-cart {
    /* Critical: Completely hidden until ready */
    display: none !important;
    
    position: fixed !important; 
    bottom: 0 !important; 
    left: 0 !important; 
    right: 0 !important;
    width: 100% !important; 
    border-radius: 24px 24px 0 0;
    transform: translateY(calc(100% - 70px));
    padding: 0 20px 20px 20px;
    transition: transform 0.8s ease !important;
  }

  /* Ready state: Show after JS delay */
  .shopping-cart.cart-ready {
    display: block !important;
    z-index: 99990 !important;
  }
  
  .shopping-cart.active { transform: translateY(0) !important; }
}
