/* ==========================================================================
   CENTURIAN E-COMMERCE EXTENSION STYLESHEET
   Supports:
   - Multi-Location & Multi-Currency Switcher Modal
   - Top Bar Location & Currency Selector Badge
   - Dynamic Currency Price Badges & Savings Pills
   - Brand Badges & Verification Icons
   - E-Commerce Cart Drawer & Toast Notifications
   ========================================================================== */

/* --- TOP BAR LOCATION SELECTOR BUTTON --- */
.ctc-top-bar-loc-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 20px;
  padding: 4px 12px;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.ctc-top-bar-loc-btn:hover {
  background: rgba(255, 255, 255, 0.24);
  border-color: #ffffff;
  transform: translateY(-1px);
}

.ctc-top-bar-loc-btn .flag-emoji {
  font-size: 1rem;
  line-height: 1;
}

.ctc-top-bar-loc-btn .currency-badge {
  background: #0069bb;
  color: #ffffff;
  font-size: 0.72rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.ctc-top-bar-loc-btn .loc-caret {
  font-size: 0.65rem;
  opacity: 0.8;
  margin-left: 2px;
}

/* --- LOCATION & CURRENCY MODAL --- */
.ctc-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(11, 30, 56, 0.7);
  backdrop-filter: blur(6px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: ctcFadeIn 0.25s ease-out;
}

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

.ctc-modal-card {
  background: #ffffff;
  border-radius: 16px;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(11, 30, 56, 0.35);
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  animation: ctcSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.ctc-modal-header {
  padding: 20px 24px;
  background: #0b1e38;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid #0069bb;
}

.ctc-modal-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ctc-modal-title-group i {
  font-size: 1.3rem;
  color: #38bdf8;
}

.ctc-modal-title-group h3 {
  font-family: 'Outfit', 'Inter', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
}

.ctc-modal-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  transition: color 0.2s ease;
}

.ctc-modal-close-btn:hover {
  color: #ffffff;
}

.ctc-modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ctc-modal-intro {
  font-size: 0.92rem;
  color: #475569;
  line-height: 1.5;
  background: #f8fafc;
  padding: 12px 16px;
  border-left: 4px solid #0069bb;
  border-radius: 6px;
  margin: 0;
}

.ctc-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ctc-form-group label {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0b1e38;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ctc-form-group label i {
  color: #0069bb;
}

.ctc-country-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 4px;
}

.ctc-country-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.ctc-country-card:hover {
  border-color: #0069bb;
  background: #f0f7ff;
}

.ctc-country-card.selected {
  border-color: #0069bb;
  background: #e8f3fc;
  box-shadow: 0 2px 8px rgba(0, 105, 187, 0.15);
}

.ctc-country-card .flag-icon {
  font-size: 1.5rem;
}

.ctc-country-card .card-details {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.ctc-country-card .country-name {
  font-size: 0.84rem;
  color: #0b1e38;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ctc-country-card .currency-tag {
  font-size: 0.74rem;
  color: #64748b;
  font-weight: 600;
}

.ctc-country-card .check-icon {
  font-size: 0.9rem;
  color: #0069bb;
  opacity: 0;
  transition: opacity 0.2s;
}

.ctc-country-card.selected .check-icon {
  opacity: 1;
}

.ctc-currency-row {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  background: #f1f5f9;
  padding: 14px 18px;
  border-radius: 10px;
}

.ctc-select-styled {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 600;
  color: #0b1e38;
  background: #ffffff;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}

.ctc-select-styled:focus {
  border-color: #0069bb;
}

.ctc-currency-preview-box {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  padding: 8px 14px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 170px;
}

.preview-label {
  font-size: 0.72rem;
  color: #64748b;
  text-transform: uppercase;
  font-weight: 600;
}

.preview-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0069bb;
  font-family: 'Outfit', sans-serif;
}

.ctc-location-shipping-perks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
}

.perk-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.82rem;
  color: #334155;
  background: #f8fafc;
  padding: 10px;
  border-radius: 8px;
}

.perk-item i {
  color: #0069bb;
  margin-top: 2px;
  font-size: 1rem;
}

.perk-item strong {
  display: block;
  color: #0b1e38;
}

.ctc-modal-footer {
  padding: 16px 24px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.ctc-admin-quick-link {
  font-size: 0.84rem;
  color: #0069bb;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: underline;
  transition: color 0.2s;
}

.ctc-admin-quick-link:hover {
  color: #0b1e38;
}

.ctc-btn-primary {
  background: linear-gradient(135deg, #0069bb, #00569c);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 11px 24px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(0, 105, 187, 0.25);
  transition: all 0.25s ease;
}

.ctc-btn-primary:hover {
  background: linear-gradient(135deg, #00569c, #0b1e38);
  box-shadow: 0 6px 16px rgba(0, 105, 187, 0.35);
  transform: translateY(-1px);
}

/* --- TOAST NOTIFICATIONS --- */
.ctc-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.ctc-toast {
  background: #0b1e38;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  border-left: 4px solid #0069bb;
  opacity: 0;
  transform: translateX(40px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
}

.ctc-toast.visible {
  opacity: 1;
  transform: translateX(0);
}

.ctc-toast i {
  color: #38bdf8;
  font-size: 1.1rem;
}

.ctc-toast-success {
  border-left-color: #22c55e;
}

.ctc-toast-success i {
  color: #22c55e;
}

/* --- PRODUCT CARD E-COMMERCE ENHANCEMENTS --- */
.price-display-block {
  margin: 10px 0 14px 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.price-main {
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: #0069bb;
  letter-spacing: -0.3px;
}

.price-compare {
  font-size: 0.88rem;
  color: #94a3b8;
  text-decoration: line-through;
  font-weight: 500;
}

.price-usd-badge {
  font-size: 0.72rem;
  background: #f1f5f9;
  color: #64748b;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  margin-left: auto;
}

.brand-badge-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #0b1e38;
  background: #f1f5f9;
  padding: 3px 8px;
  border-radius: 4px;
  transition: all 0.2s;
}

.brand-badge-link:hover {
  background: #0069bb;
  color: #ffffff;
}

.stock-indicator-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #166534;
  background: #dcfce7;
  padding: 2px 8px;
  border-radius: 12px;
}

.stock-indicator-pill.out-of-stock {
  color: #991b1b;
  background: #fee2e2;
}

.stock-indicator-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* --- QUICK ACTION BUTTONS --- */
.card-ecomm-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.btn-card-add-cart {
  flex: 1;
  background: #0069bb;
  color: #ffffff;
  padding: 9px 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.84rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-card-add-cart:hover {
  background: #0b1e38;
  transform: translateY(-1px);
}

.btn-card-view-detail {
  background: #f8fafc;
  color: #0b1e38;
  border: 1px solid #cbd5e1;
  padding: 9px 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.84rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-card-view-detail:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .ctc-country-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .ctc-currency-row {
    flex-direction: column;
    align-items: stretch;
  }
}
