@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700&display=swap');

:root {
  --bg: #1a1a1a;
  --surface: #000;
  --primary: #41c4c3;
  --secondary: #e5e5e5;
  --error: #c12e2e;
  --fields: #262626;
  --field-border: #333;
  --gray-100: #fff;
  --gray-300: #e5e5e5;
  --gray-500: #868996;
  --gray-700: #b2b2b2;
  --gray-900: #4d4d4d;
  --gray-1000: #333;
  --text: #fff;
  --text-muted: #b2b2b2;
}

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

body {
  font-family: 'Lato', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.layout {
  display: flex;
  flex: 1;
  min-height: calc(100vh - 60px);
}

/* Sidebar */
.sidebar {
  width: 50%;
  max-width: 715px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  padding: 0;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 60px;
  overflow-y: auto;
}

.sidebar-content {
  margin-left: auto;
  max-width: 500px;
  width: 100%;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.logo {
  height: 50px;
  max-width: 200px;
  object-fit: contain;
  margin: 20px;
  display: block;
}

.order-section {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.order-header span {
  font-size: 14px;
  color: var(--text);
}

.link {
  color: var(--primary);
  text-decoration: none;
  font-size: 14px;
}

.link:hover {
  text-decoration: underline;
}

/* Product Item */
.product-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
}

.product-image {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  background: var(--fields);
  flex-shrink: 0;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-info {
  flex: 1;
}

.product-title {
  font-size: 14px;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 4px;
}

.product-price {
  font-size: 13px;
  color: var(--text-muted);
}

.product-badge {
  display: inline-block;
  background: var(--gray-1000);
  color: var(--text);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 6px;
  letter-spacing: 0.5px;
}

/* Coupon */
.coupon-section {
  margin-top: auto;
  padding-top: 24px;
}

.coupon-section label {
  display: block;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 6px;
}

.input-field {
  width: 100%;
  background: var(--fields);
  border: 1px solid var(--field-border);
  border-radius: 4px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 14px;
  font-family: 'Lato', sans-serif;
  outline: none;
  transition: border-color 0.2s;
}

.input-field::placeholder {
  color: var(--gray-500);
}

.input-field:focus {
  border-color: var(--primary);
}

/* Totals */
.totals {
  padding-top: 24px;
}

.total-row {
  display: flex;
  justify-content: space-between;
  padding-bottom: 12px;
  font-size: 14px;
  color: var(--gray-300);
  font-weight: 700;
}

.divider {
  border: none;
  border-top: 1px solid var(--field-border);
  margin-bottom: 12px;
}

.total-final {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 20px;
  color: var(--text);
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: 50%;
  padding: 24px 40px;
  padding-bottom: 80px;
  max-width: 600px;
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.breadcrumbs li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.breadcrumbs li a {
  text-decoration: none;
}

.breadcrumbs .inactive a {
  color: var(--gray-700);
}

.breadcrumbs .active a {
  color: var(--primary);
}

.breadcrumbs .disabled {
  color: var(--gray-700);
}

.breadcrumb-arrow {
  width: 6px;
  height: 10px;
  fill: var(--gray-700);
}

/* Form */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 6px;
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-row .form-group {
  flex: 1;
}

/* Payment Methods */
.payment-methods {
  margin: 20px 0;
}

.payment-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}

.payment-card {
  height: 65px;
  border: 1px solid var(--field-border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: transparent;
  transition: all 0.2s;
  padding: 8px;
}

.payment-card:hover {
  border-color: var(--gray-500);
}

.payment-card.selected {
  border-color: var(--primary);
  background: rgba(65, 196, 195, 0.08);
}

.payment-card img {
  max-height: 40px;
  max-width: 80%;
  object-fit: contain;
}

.payment-card .payment-label {
  font-size: 12px;
  color: var(--text);
  text-align: center;
  font-weight: 700;
}

.more-methods-btn {
  width: 100%;
  height: 30px;
  border: 1px solid var(--field-border);
  border-radius: 4px;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  font-family: 'Lato', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.more-methods-btn:hover {
  border-color: var(--gray-500);
}

/* Card Input Mock */
.card-input-area {
  background: var(--fields);
  border: 1px solid var(--field-border);
  border-radius: 4px;
  padding: 12px;
  margin-bottom: 8px;
}

.card-fields-row {
  display: flex;
  gap: 12px;
}

.card-field {
  flex: 1;
}

.card-field label {
  display: block;
  font-size: 12px;
  color: var(--gray-500);
  margin-bottom: 4px;
}

.card-field input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--field-border);
  padding: 6px 0;
  color: var(--text);
  font-size: 14px;
  font-family: 'Lato', sans-serif;
  outline: none;
}

.card-field input:focus {
  border-bottom-color: var(--primary);
}

.card-field input::placeholder {
  color: var(--gray-500);
}

/* Toggle Switch */
.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
  font-size: 14px;
}

.toggle-switch {
  position: relative;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--gray-900);
  border-radius: 12px;
  cursor: pointer;
  transition: 0.2s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  bottom: 3px;
  background: var(--text);
  border-radius: 50%;
  transition: 0.2s;
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--primary);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(18px);
}

/* Checkboxes */
.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 10px 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
}

.checkbox-row input[type="checkbox"] {
  appearance: none;
  width: 18px;
  height: 18px;
  min-width: 18px;
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 2px;
  cursor: pointer;
  margin-top: 2px;
  position: relative;
}

.checkbox-row input[type="checkbox"]:checked {
  background: var(--primary);
  border-color: var(--primary);
}

.checkbox-row input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  color: #000;
  font-size: 12px;
  font-weight: 700;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.checkbox-row a {
  color: var(--primary);
  text-decoration: none;
}

.checkbox-row a:hover {
  text-decoration: underline;
}

/* Submit Button */
.submit-btn {
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: #000;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Lato', sans-serif;
  margin-top: 16px;
  transition: opacity 0.2s;
}

.submit-btn:hover {
  opacity: 0.9;
}

/* Footer */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--surface);
  border-top: 1px solid var(--field-border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 16px;
  z-index: 10;
}

.footer-logo {
  height: 20px;
  opacity: 0.5;
  filter: grayscale(1) brightness(2);
}

.footer-desc {
  font-size: 11px;
  color: var(--gray-500);
  flex: 1;
  line-height: 1.4;
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-shrink: 0;
}

.footer-links a {
  color: var(--gray-500);
  text-decoration: none;
  font-size: 11px;
  white-space: nowrap;
}

.footer-links a:hover {
  color: var(--text);
}

/* SVG icons inline */
.card-brands {
  display: flex;
  gap: 6px;
  align-items: center;
}

.card-brand-icon {
  width: 36px;
  height: 24px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
}

.visa { background: #1a1f71; }
.mastercard { background: #eb001b; }
.amex { background: #2e77bc; }
.discover { background: #ff6600; }

/* Responsive */
@media (max-width: 1100px) {
  .sidebar {
    position: relative;
    width: 100%;
    max-width: 100%;
    bottom: auto;
  }
  .main-content {
    margin-left: 0;
    max-width: 100%;
    padding-bottom: 100px;
  }
  .layout {
    flex-direction: column;
  }
  .sidebar-content {
    max-width: 100%;
    margin: 0 auto;
  }
  .footer {
    position: relative;
    flex-wrap: wrap;
    height: auto;
    padding: 12px 20px;
    gap: 8px;
  }
  .payment-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
