:root {
  /* --- Color Palette --- */
  --sq-primary: #2563eb;       /* Professional Blue */
  --sq-primary-dark: #1e40af;  /* Darker Blue for Hovers */
  --sq-secondary: #64748b;     /* Slate Grey for text */
  --sq-dark: #0f172a;          /* Deep Navy for headings */
  --sq-light: #f8fafc;         /* Very light grey for backgrounds */
  --sq-white: #ffffff;
  --sq-danger: #ef4444;        /* Red for errors/remove */
  --sq-success: #10b981;       /* Green for success */
  
  /* --- UI Variables --- */
  --sq-radius: 12px;           /* Modern rounded corners */
  --sq-shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --sq-shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
  --sq-shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
  --sq-font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* =========================================
   1. GLOBAL LAYOUT & TYPOGRAPHY
   ========================================= */
.sq-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  font-family: var(--sq-font);
  color: var(--sq-secondary);
  line-height: 1.6;
}

.sq-wrapper * {
  box-sizing: border-box;
}

.sq-section {
  margin: 60px 0;
}

.sq-section h3 {
  color: var(--sq-dark);
  font-size: 1.8rem;
  margin-bottom: 25px;
  padding-left: 15px;
  border-left: 5px solid var(--sq-primary);
  font-weight: 700;
}

/* =========================================
   2. CONTROLS (Search, Filter, Sort)
   ========================================= */
.sq-controls {
  background: var(--sq-white);
  padding: 20px;
  border-radius: var(--sq-radius);
  box-shadow: var(--sq-shadow-sm);
  border: 1px solid #e2e8f0;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 15px;
  align-items: center;
  margin-bottom: 40px;
}

@media (max-width: 768px) {
  .sq-controls { grid-template-columns: 1fr; }
}

.sq-controls input, 
.sq-controls select {
  padding: 12px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.sq-controls input:focus, 
.sq-controls select:focus {
  border-color: var(--sq-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* =========================================
   3. SERVICE GRID & CARDS
   ========================================= */
.sq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

.sq-card {
  background: var(--sq-white);
  border-radius: var(--sq-radius);
  border: 1px solid #e2e8f0;
  box-shadow: var(--sq-shadow-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.sq-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--sq-shadow-lg);
  border-color: #cbd5e1;
}

/* Image Aspect Ratio Enforcement */
.sq-card-img {
  width: 100%;
  padding-top: 65%; /* 3:2 Aspect Ratio */
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid #f1f5f9;
}

.sq-card-content {
  padding: 24px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.sq-card-content h3 {
  margin: 0 0 15px 0;
  font-size: 1.25rem;
  line-height: 1.3;
}

.sq-card-content h3 a {
  text-decoration: none;
  color: var(--sq-dark);
  transition: color 0.2s;
}

.sq-card-content h3 a:hover {
  color: var(--sq-primary);
}

.sq-card-content p {
  font-size: 0.95rem;
  margin-bottom: 20px;
  flex-grow: 1;
  color: var(--sq-secondary);
}

/* Buttons */
.sq-btn {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  border: none;
  font-size: 0.95rem;
}

.sq-btn-outline {
  background: transparent;
  border: 2px solid var(--sq-dark);
  color: var(--sq-dark);
}

.sq-btn-outline:hover {
  background: var(--sq-dark);
  color: white;
}

.sq-btn-block {
  width: 100%;
  display: block;
}

/* =========================================
   4. SINGLE SERVICE DETAILS
   ========================================= */

/* Timeline (Process) */
.sq-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.sq-timeline-item {
  background: var(--sq-light);
  padding: 20px;
  border-radius: var(--sq-radius);
  border: 1px solid #e2e8f0;
  display: flex;
  gap: 15px;
}

.sq-timeline-item span {
  width: 36px;
  height: 36px;
  background: var(--sq-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  flex-shrink: 0;
}

/* Pricing Table */
.sq-pricing-table {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.sq-price-card {
  background: var(--sq-white);
  border: 2px solid #e2e8f0;
  padding: 30px;
  border-radius: 16px;
  text-align: center;
  transition: 0.3s;
}

.sq-price-card:hover {
  border-color: var(--sq-primary);
  transform: translateY(-5px);
  box-shadow: var(--sq-shadow-md);
}

.sq-price-card h4 {
  font-size: 1.2rem;
  color: var(--sq-dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 15px;
}

.sq-price-card ul {
  list-style: none;
  padding: 0;
  text-align: left;
  margin: 20px 0;
}

.sq-price-card ul li {
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
}

.sq-add-to-cart {
  background: var(--sq-dark);
  color: white;
  width: 100%;
}
.sq-add-to-cart:hover {
  background: var(--sq-primary);
}
.sq-add-to-cart.sq-added {
  background: var(--sq-success);
}

/* Bundles (Mini Grid) */
.sq-grid-mini {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 15px;
}

.sq-card-mini {
  display: flex;
  align-items: center;
  background: var(--sq-white);
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.sq-mini-img {
  width: 70px;
  height: 70px;
  border-radius: 8px;
  background-size: cover;
  margin-right: 15px;
  flex-shrink: 0;
}

.sq-mini-info h4 {
  margin: 0;
  font-size: 1rem;
  color: var(--sq-dark);
}

.sq-btn-sm {
  background: var(--sq-primary);
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  margin-top: 5px;
  cursor: pointer;
}

/* =========================================
   5. FLOATING CART & MODAL
   ========================================= */
.sq-floater {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 65px;
  height: 65px;
  background: var(--sq-primary);
  color: white;
  border-radius: 50%;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9999;
  font-size: 28px;
  transform: scale(0);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.sq-floater.visible { transform: scale(1); }

.sq-floater #sq-count {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--sq-danger);
  font-size: 12px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  border: 2px solid white;
}

/* Modal Backdrop */
.sq-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(5px); /* Glassmorphism effect */
}

/* Modal Content */
.sq-modal-content {
  background: #ffffff;
  margin: 5vh auto;
  width: 90%;
  max-width: 650px;
  border-radius: 16px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  animation: slideUp 0.3s ease-out forwards;
}

@keyframes slideUp {
  from { transform: translateY(50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.sq-modal h2 {
  background: var(--sq-light);
  margin: 0;
  padding: 20px 30px;
  font-size: 1.4rem;
  border-bottom: 1px solid #e2e8f0;
  color: var(--sq-dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sq-close-modal {
  cursor: pointer;
  color: #94a3b8;
  font-size: 2rem;
  line-height: 1;
}
.sq-close-modal:hover { color: var(--sq-danger); }

.sq-modal-body { padding: 30px; }

/* Modal Table */
.sq-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 25px;
}
.sq-table th {
  text-align: left;
  color: var(--sq-secondary);
  font-weight: 600;
  border-bottom: 2px solid #e2e8f0;
  padding: 10px;
}
.sq-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #f1f5f9;
  color: var(--sq-dark);
}

/* Form inputs in Modal */
.sq-checkout-form input,
.sq-checkout-form textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-family: inherit;
}
.sq-checkout-form button {
  background: var(--sq-primary);
  color: white;
  padding: 15px;
  border-radius: 8px;
  border: none;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  width: 100%;
}
.sq-checkout-form button:hover {
  background: var(--sq-primary-dark);
}

/* Messages */
.sq-success {
  background: #dcfce7;
  color: #166534;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  margin-top: 15px;
}
.sq-error {
  background: #fee2e2;
  color: #991b1b;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  margin-top: 15px;
}