// Base styles (platform theme)
.cart-container.platform {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
  min-height: calc(100vh - 200px);
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

// alt theme - Modern green design
.cart-container.alt {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
  min-height: calc(100vh - 200px);
  background: linear-gradient(to bottom, rgba(16, 185, 129, 0.02) 0%, transparent 300px);
}

.cart-container.platform .cart-header {
  margin-bottom: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;

  h1 {
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: #1e3c38;
    margin: 0;
  }

  .clear-cart-btn {
    padding: 10px 20px;
    background: transparent;
    color: #697777;
    border: 1px solid #d3dad9;
    border-radius: 13px;
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;

    svg {
      display: block;
      width: 16px;
      height: 16px;
    }

    &:hover {
      background: #fef2f2;
      border-color: #ef4444;
      color: #ef4444;
      transform: translateY(-1px);
    }

    &:active {
      transform: translateY(0);
    }
  }
}

.cart-container.alt .cart-header {
  margin-bottom: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;

  h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .clear-cart-btn {
    padding: 10px 18px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);

    svg {
      display: block;
      width: 18px;
      height: 18px;
    }

    &:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(239, 68, 68, 0.35);
    }

    &:active {
      transform: translateY(0);
    }
  }
}

// Empty cart - platform
.cart-container.platform .empty-cart {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
  background: #f5f3f9;
  border-radius: 13px;
  border: 1px solid #d3dad9;

  .empty-icon {
    margin-bottom: 28px;
    
    svg {
      width: 90px;
      height: 90px;
      opacity: 0.7;
    }
  }

  h2 {
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: #1e3c38;
    margin: 0 0 12px 0;
  }

  p {
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 1rem;
    color: #697777;
    margin: 0 0 28px 0;
  }

  .shop-btn {
    padding: 14px 32px;
    background: #497671;
    color: white;
    text-decoration: none;
    border-radius: 13px;
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s;
    box-shadow: 0 3px 4px 0 rgba(0, 0, 0, 0.15);

    &:hover {
      background: #3a5f5b;
      transform: translateY(-2px);
      box-shadow: 0 6px 12px rgba(73, 118, 113, 0.3);
    }
  }
}

// Empty cart - alt
.cart-container.alt .empty-cart {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100px 20px;
  text-align: center;
  background: white;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);

  .empty-icon {
    margin-bottom: 32px;
    
    svg {
      width: 100px;
      height: 100px;
      opacity: 0.8;
    }
  }

  h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 12px 0;
  }

  p {
    font-size: 1rem;
    color: #6b7280;
    margin: 0 0 32px 0;
  }

  .shop-btn {
    padding: 14px 32px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);

    &:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 24px rgba(16, 185, 129, 0.4);
    }
  }
}

.cart-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 24px;
  align-items: start;
}

// alt wider summary
.cart-container.alt .cart-content {
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 32px;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

// alt larger gap
.cart-container.alt .cart-items {
  gap: 20px;
}

.cart-item-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  transition: transform 0.3s ease;

  &.swiped {
    .cart-item {
      transform: translateX(-80px);
    }

    .delete-btn-mobile {
      opacity: 1;
      pointer-events: all;
    }
  }
}

// alt rounded corners
.cart-container.alt .cart-item-wrapper {
  border-radius: 16px;
}

// platform cart item
.cart-container.platform .cart-item {
  display: flex;
  gap: 20px;
  background: white;
  border: 1px solid #d3dad9;
  border-radius: 13px;
  padding: 20px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);

  &:hover {
    border-color: #a1b4b5;
    box-shadow: 0 4px 12px rgba(73, 118, 113, 0.1);
    transform: translateY(-1px);
  }

  .item-image {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    border-radius: 13px;
    overflow: hidden;
    background: #f5f3f9;
    border: 1px solid #d3dad9;

    img {
      width: 100%;
      height: 100%;
      object-fit: contain;
      background: white;
      display: block;
      padding: 6px;
      transition: transform 0.3s ease;
    }

    &:hover img {
      transform: scale(1.05);
    }
  }

  .item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
  }

  .item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
  }

  .item-name {
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: #1e3c38;
    text-decoration: none;
    transition: color 0.2s;

    &:hover {
      color: #497671;
    }
  }

  .remove-btn {
    flex-shrink: 0;
    padding: 6px;
    background: transparent;
    border: none;
    color: #a1b4b5;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;

    &:hover {
      background: #fef2f2;
      color: #ef4444;
    }
  }

  .item-description {
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.875rem;
    color: #697777;
    line-height: 1.5;
  }

  .cart-item-variants {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 4px;

    .cart-variant {
      font-size: 0.8rem;
      color: #497671;
      background: rgba(73, 118, 113, 0.08);
      padding: 3px 10px;
      border-radius: 6px;
      font-weight: 500;
      display: inline-flex;
      align-items: center;
      gap: 6px;
    }

    .cart-colour-swatch {
      display: inline-block;
      width: 16px;
      height: 16px;
      border-radius: 50%;
      border: 1px solid rgba(0, 0, 0, 0.15);
      vertical-align: middle;
    }
  }

  .item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
  }
}

// alt cart item - modern green theme
.cart-container.alt .cart-item {
  display: flex;
  gap: 20px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 20px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);

  &:hover {
    border-color: #10b981;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.12);
    transform: translateY(-2px);
  }

  .item-image {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, #f0fdf4 0%, #d1fae5 100%);
    border: 2px solid #d1fae5;

    img {
      width: 100%;
      height: 100%;
      object-fit: contain;
      background: white;
      display: block;
      transition: transform 0.3s;
    }

    &:hover img {
      transform: scale(1.05);
    }
  }

  .item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
  }

  .item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
  }

  .item-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    text-decoration: none;
    transition: color 0.2s;

    &:hover {
      color: #10b981;
    }
  }

  .remove-btn {
    flex-shrink: 0;
    padding: 6px;
    background: transparent;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;

    &:hover {
      background: #fef2f2;
      color: #ef4444;
      transform: rotate(90deg);
    }
  }

  .item-description {
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.6;
  }

  .cart-item-variants {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 4px;

    .cart-variant {
      font-size: 0.8rem;
      color: #6366f1;
      background: rgba(99, 102, 241, 0.08);
      padding: 3px 10px;
      border-radius: 6px;
      font-weight: 500;
      display: inline-flex;
      align-items: center;
      gap: 6px;
    }

    .cart-colour-swatch {
      display: inline-block;
      width: 16px;
      height: 16px;
      border-radius: 50%;
      border: 1px solid rgba(0, 0, 0, 0.15);
      vertical-align: middle;
    }
  }

  .item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
  }
}

// Pricing & Quantity - shared
.item-pricing {
  display: flex;
  flex-direction: column;
  gap: 4px;

  .price-with-discount {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .original-price {
    font-size: 0.85rem;
    color: #9ca3af;
    text-decoration: line-through;
  }

  .current-price {
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #497671;
  }

  .delivery-price {
    font-size: 0.85rem;
    font-weight: 500;
    color: #697777;
  }
}

// platform quantity controls
.cart-container.platform .quantity-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f5f3f9;
  border-radius: 13px;
  padding: 4px 10px;
  border: 1px solid #d3dad9;

  .qty-btn {
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    color: #497671;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;

    &:hover:not(:disabled) {
      background: #497671;
      color: white;
    }

    &:disabled {
      opacity: 0.3;
      cursor: not-allowed;
    }
  }

  .qty-value {
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #1e3c38;
    min-width: 24px;
    text-align: center;
  }
}

// alt quantity controls - modern green
.cart-container.alt .quantity-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, #f0fdf4 0%, #d1fae5 100%);
  border-radius: 24px;
  padding: 6px 12px;
  border: 1px solid #d1fae5;

  .qty-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: white;
    color: #10b981;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);

    &:hover:not(:disabled) {
      background: #10b981;
      color: white;
      transform: scale(1.1);
      box-shadow: 0 4px 8px rgba(16, 185, 129, 0.25);
    }

    &:disabled {
      opacity: 0.3;
      cursor: not-allowed;
    }
  }

  .qty-value {
    font-size: 1rem;
    font-weight: 700;
    color: #059669;
    min-width: 24px;
    text-align: center;
  }
}

.delete-btn-mobile {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 80px;
  background: #ef4444;
  border: none;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  border-radius: 0 12px 12px 0;

  &:active {
    background: #dc2626;
  }
}

// platform Cart Summary
.cart-container.platform .cart-summary {
  position: sticky;
  top: 90px;
  background: #f5f3f9;
  border: 1px solid #d3dad9;
  border-radius: 13px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 3px 4px 0 rgba(0, 0, 0, 0.15);

  .summary-header h3 {
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: #1e3c38;
    margin: 0 0 16px 0;
  }

  .summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.95rem;
    color: #697777;

    &.delivery {
      display: flex;
    }

    &.total {
      padding-top: 16px;
      border-top: 1px solid #d3dad9;
      font-size: 1.15rem;
      font-weight: 700;
      color: #1e3c38;
      margin-top: 8px;

      .total-price {
        font-size: 1.35rem;
        color: #497671;
      }
    }
  }

  .payment-method-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 8px;
  }

  .checkout-btn {
    width: 100%;
    padding: 16px;
    background: #497671;
    color: white;
    border: none;
    border-radius: 13px;
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 3px 4px 0 rgba(0, 0, 0, 0.15);

    &:hover:not(:disabled) {
      background: #3a5f5b;
      transform: translateY(-2px);
      box-shadow: 0 6px 16px rgba(73, 118, 113, 0.3);
    }

    &:active {
      transform: translateY(0);
    }

    &:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }
  }

  .cart-login-gate {
    margin-top: 16px;
    padding: 20px;
    border-radius: 14px;
    background: rgba(42, 171, 238, 0.05);
    border: 1px dashed rgba(42, 171, 238, 0.3);
    text-align: center;

    .login-gate-icon {
      margin: 0 auto 10px;
      width: 56px;
      height: 56px;
      border-radius: 50%;
      background: rgba(42, 171, 238, 0.1);
      color: #2AABEE;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .login-gate-title {
      margin: 0 0 4px;
      font-size: 1rem;
      font-weight: 700;
      color: #1a1a1a;
    }

    .login-gate-desc {
      margin: 0 0 16px;
      font-size: 0.85rem;
      color: #6b7280;
      line-height: 1.4;
    }

    .telegram-login-btn {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 12px 24px;
      border: none;
      border-radius: 10px;
      background: #2AABEE;
      color: #fff;
      font-size: 0.95rem;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s;

      &:hover {
        background: #229ED9;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(42, 171, 238, 0.3);
      }
    }
  }

  .card-payment-btn {
    background: #1f2937;

    &:hover:not(:disabled) {
      background: #111827;
      box-shadow: 0 6px 16px rgba(31, 41, 55, 0.28);
    }
  }
}

// alt Cart Summary - Green Modern
.cart-container.alt .cart-summary {
  position: sticky;
  top: 20px;
  background: white;
  border: none;
  border-radius: 20px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);

  .summary-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 20px 0;
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
    color: #6b7280;

    &.delivery {
      display: flex;
    }

    &.total {
      padding-top: 20px;
      border-top: 2px solid #f0fdf4;
      font-size: 1.2rem;
      font-weight: 700;
      color: #111827;
      margin-top: 12px;

      .total-price {
        font-size: 1.5rem;
        color: #10b981;
        font-weight: 800;
      }
    }

    .value {
      font-weight: 600;
      color: #111827;
    }
  }

  .payment-method-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 12px;
  }

  .checkout-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);

    &:hover:not(:disabled) {
      transform: translateY(-2px);
      box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
    }

    &:active {
      transform: translateY(0);
    }

    &:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }
  }

  .card-payment-btn {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    box-shadow: 0 4px 16px rgba(31, 41, 55, 0.22);

    &:hover:not(:disabled) {
      box-shadow: 0 8px 24px rgba(31, 41, 55, 0.3);
    }
  }

  .cart-login-gate {
    margin-top: 20px;
    padding: 24px;
    border-radius: 16px;
    background: rgba(16, 185, 129, 0.04);
    border: 1px dashed rgba(16, 185, 129, 0.3);
    text-align: center;

    .login-gate-icon {
      margin: 0 auto 12px;
      width: 56px;
      height: 56px;
      border-radius: 50%;
      background: rgba(16, 185, 129, 0.1);
      color: #10b981;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .login-gate-title {
      margin: 0 0 4px;
      font-size: 1rem;
      font-weight: 700;
      color: #111827;
    }

    .login-gate-desc {
      margin: 0 0 16px;
      font-size: 0.85rem;
      color: #6b7280;
      line-height: 1.4;
    }

    .telegram-login-btn {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 12px 24px;
      border: none;
      border-radius: 12px;
      background: #2AABEE;
      color: #fff;
      font-size: 0.95rem;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

      &:hover {
        background: #229ED9;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(42, 171, 238, 0.3);
      }
    }
  }
}

// Terms agreement - shared base
.terms-agreement {
  margin-top: 12px;

  .checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    position: relative;
    padding-left: 28px;

    input[type="checkbox"] {
      position: absolute;
      opacity: 0;
      cursor: pointer;
      height: 0;
      width: 0;
    }

    .checkmark {
      position: absolute;
      left: 0;
      top: 2px;
      height: 18px;
      width: 18px;
      background: white;
      border: 2px solid #d1d5db;
      border-radius: 4px;
      transition: all 0.2s;

      &::after {
        content: "";
        position: absolute;
        display: none;
        left: 5px;
        top: 2px;
        width: 4px;
        height: 8px;
        border: solid white;
        border-width: 0 2px 2px 0;
        transform: rotate(45deg);
      }
    }

    .terms-text {
      font-size: 0.85rem;
      color: #6b7280;
      line-height: 1.4;

      a {
        color: var(--primary-color);
        text-decoration: none;

        &:hover {
          text-decoration: underline;
        }
      }
    }
  }
}

.delivery-warning {
  margin: -4px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.85rem;
  line-height: 1.5;
}

.cart-container.platform .cart-summary .delivery-warning {
  color: #9a6700;
  background: #fff8e8;
  border: 1px solid #f1ddb2;
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.cart-container.alt .cart-summary .delivery-warning {
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
}

// platform checkbox colors
.cart-container.platform .terms-agreement .checkbox-container {
  input[type="checkbox"]:checked ~ .checkmark {
    background: #497671;
    border-color: #497671;

    &::after {
      display: block;
    }
  }

  .checkmark {
    border: 2px solid #d3dad9;
    border-radius: 4px;
  }

  .terms-text {
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.85rem;
    color: #697777;
    line-height: 1.5;

    a {
      color: #497671;
      text-decoration: none;
      font-weight: 600;

      &:hover {
        text-decoration: underline;
        color: #3a5f5b;
      }
    }
  }
}

// alt checkbox colors - green
.cart-container.alt .terms-agreement .checkbox-container {
  input[type="checkbox"]:checked ~ .checkmark {
    background: #10b981;
    border-color: #10b981;

    &::after {
      display: block;
    }
  }

  .checkmark {
    border: 2px solid #d1fae5;
    border-radius: 6px;
  }

  .terms-text {
    font-size: 0.9rem;
    line-height: 1.6;

    a {
      color: #10b981;
      font-weight: 600;

      &:hover {
        color: #059669;
      }
    }
  }
}

// Payment modal styles
.payment-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.payment-modal {
  background: white;
  border-radius: 13px;
  max-width: 500px;
  width: 100%;
  padding: 40px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid #d3dad9;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}
.close-modal-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: none;
  background: #f3f4f6;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #6b7280;
  z-index: 10;

  &:hover {
    background: #e5e7eb;
    color: #1f2937;
    transform: scale(1.1);
  }

  &:active {
    transform: scale(0.95);
  }

  svg {
    width: 20px;
    height: 20px;
  }
}
.close-modal-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: none;
  background: #f3f4f6;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #6b7280;
  z-index: 10;

  &:hover {
    background: #e5e7eb;
    color: #1f2937;
    transform: scale(1.1);
  }

  &:active {
    transform: scale(0.95);
  }

  svg {
    width: 20px;
    height: 20px;
  }
}

.payment-status-screen {
  text-align: center;

  h2 {
    font-size: 1.5rem;
    margin: 20px 0 10px;
    color: #1a1a1a;
  }

  p {
    color: #6b7280;
    margin: 0;
  }

  &.success {
    .success-icon {
      width: 80px;
      height: 80px;
      background: #10b981;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 3rem;
      color: white;
      margin: 0 auto 20px;
    }
  }

  &.error {
    .error-icon {
      width: 80px;
      height: 80px;
      background: #f97316;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 3rem;
      font-weight: 700;
      color: white;
      margin: 0 auto 20px;
    }

    .payment-error-actions {
      margin-top: 24px;
    }

    .retry-payment-btn {
      padding: 14px 24px;
      background: #497671;
      color: white;
      border: none;
      border-radius: 13px;
      font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
      font-size: 1rem;
      font-weight: 700;
      cursor: pointer;
      transition: all 0.2s;

      &:hover {
        background: #3a5f5b;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(73, 118, 113, 0.3);
      }
    }
  }

  &.timeout {
    .timeout-icon {
      font-size: 4rem;
      margin-bottom: 20px;
    }

    .auto-close {
      font-size: 0.85rem;
      margin-top: 20px;
    }
  }
}

.spinner-large,
.spinner-small {
  width: 50px;
  height: 50px;
  border: 4px solid #d3dad9;
  border-top: 4px solid #497671;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

.spinner-small {
  width: 20px;
  height: 20px;
  border-width: 2px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.payment-active {
  h2 {
    text-align: center;
    margin-bottom: 24px;
    color: #1a1a1a;
  }

  .qr-section {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
  }

  .qr-wrapper {
    padding: 16px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
  }

  .qr-code {
    display: block;
    width: 250px;
    height: 250px;
  }

  .scan-line {
    position: absolute;
    top: 16px;
    left: 16px;
    right: 16px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #497671, transparent);
    animation: scan 2s linear infinite;
    box-shadow: 0 0 10px #497671;
  }

  @keyframes scan {
    0% {
      top: 16px;
    }
    50% {
      top: calc(100% - 18px);
    }
    100% {
      top: 16px;
    }
  }

  .payment-info {
    margin-bottom: 20px;
  }

  .payment-amount {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 16px;

    .label {
      color: #6b7280;
      font-size: 0.95rem;
    }

    .amount {
      font-size: 1.25rem;
      font-weight: 700;
      color: #1a1a1a;
    }
  }

  .waiting-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #6b7280;

    .pulse-dot {
      width: 8px;
      height: 8px;
      background: #497671;
      border-radius: 50%;
      animation: pulse 1.5s ease-in-out infinite;
    }
  }

  .payment-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;

    .copy-btn,
    .open-btn {
      flex: 1;
      padding: 12px 16px;
      border-radius: 8px;
      font-weight: 600;
      font-size: 0.95rem;
      cursor: pointer;
      transition: all 0.3s ease;
      text-align: center;
      text-decoration: none;
      border: none;
      white-space: nowrap;
    }

    .copy-btn {
      background: #10b981;
      color: white;
      box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);

      &:hover {
        background: #059669;
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35);
      }

      &:active {
        transform: translateY(0);
      }
    }

    .open-btn {
      background: var(--primary-color);
      color: white;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 4px 12px rgba(73, 118, 113, 0.25);

      &:hover {
        background: var(--primary-hover);
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(73, 118, 113, 0.35);
      }

      &:active {
        transform: translateY(0);
      }
    }
  }

}

.bank-payment-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(17, 24, 39, 0.55);
}

.bank-payment-modal {
  position: relative;
  width: min(960px, 92vw);
  height: min(760px, 86vh);
  padding: 56px 16px 16px;
  background: white;
  border-radius: 13px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
}

.bank-payment-frame {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 8px;
  background: white;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.3);
    opacity: 0.5;
  }
}

.email-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;

  .input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .error-message {
    color: #ef4444;
    font-size: 0.875rem;
    padding-left: 4px;
    animation: slideDown 0.2s ease;
  }

  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-4px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .email-input {
    width: 100%;
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: all 0.2s;

    &:focus {
      border-color: #497671;
      box-shadow: 0 0 0 3px rgba(73, 118, 113, 0.1);
    }

    &.valid {
      border-color: #10b981;
      background-color: #f0fdf4;
      
      &:focus {
        border-color: #10b981;
        box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
      }
    }

    &.invalid {
      border-color: #ef4444;
      background-color: #fef2f2;
      
      &:focus {
        border-color: #ef4444;
        box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
      }
    }
  }

  .submit-email-btn {
    padding: 14px;
    background: #497671;
    color: white;
    border: none;
    border-radius: 13px;
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;

    &:hover:not(:disabled) {
      background: #3a5f5b;
      transform: translateY(-1px);
      box-shadow: 0 4px 12px rgba(73, 118, 113, 0.3);
    }

    &:disabled {
      opacity: 0.6;
      cursor: not-allowed;
    }
  }
}

// Mobile responsive
@media (max-width: 768px) {
  .cart-content {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .cart-container.alt .cart-content {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .cart-summary {
    position: static;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .cart-container.alt,
  .cart-container.platform {
    padding: 16px;
  }

  .cart-container.alt .cart-header,
  .cart-container.platform .cart-header {
    flex-wrap: wrap;
    gap: 12px;
  }

  .remove-btn-desktop {
    display: none !important;
  }

  .delete-btn-mobile {
    display: flex;
  }

  .payment-modal {
    padding: 24px;
    padding-top: 56px; // Дополнительный отступ сверху для кнопки закрытия
  }

  .close-modal-btn {
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;

    svg {
      width: 18px;
      height: 18px;
    }
  }

  .qr-code {
    width: 200px !important;
    height: 200px !important;
  }

  .payment-actions {
    flex-direction: column;
    gap: 10px;

    .copy-btn,
    .open-btn {
      width: 100%;
      padding: 12px;
    }
  }

  .payment-method-actions {
    grid-template-columns: 1fr;
  }

  .bank-payment-modal-overlay {
    padding: 12px;
  }

  .bank-payment-modal {
    width: 94vw;
    height: 82vh;
    padding: 52px 10px 10px;
  }

  .payment-active h2 {
    font-size: 1.25rem;
    margin-bottom: 16px;
  }
}

@media (min-width: 769px) {
  .delete-btn-mobile {
    display: none !important;
  }
}

/* =============================================
   alt THEME STYLES - Modern Cart Design
   ============================================= */

.alt-cart-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
  min-height: calc(100vh - 200px);
}

.alt-cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--border-color);

  h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    background: linear-gradient(135deg, #10b981 0%, #14b8a6 50%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .alt-clear-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;

    svg {
      width: 18px;
      height: 18px;
    }

    &:hover {
      transform: translateY(-2px);
      box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3);
    }

    &:active {
      transform: translateY(0);
    }
  }
}

.alt-empty-cart {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  margin: 2rem 0;

  .empty-icon {
    margin-bottom: 2rem;
    
    svg {
      width: 100px;
      height: 100px;
      opacity: 0.6;
    }
  }

  h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.75rem 0;
  }

  p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0 0 2rem 0;
    max-width: 400px;
  }

  .alt-shop-btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, #10b981, #14b8a6, #06b6d4);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;

    &:hover {
      transform: translateY(-2px);
      box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
    }
  }
}

.alt-cart-content {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 2rem;
  align-items: start;
}

.alt-cart-items {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.alt-cart-item {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  transition: all 0.3s ease;

  &:hover {
    border-color: #10b981;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.1);
    transform: translateY(-2px);
  }

  .alt-item-image {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: white;
    border: 1px solid var(--border-color);

    img {
      width: 100%;
      height: 100%;
      object-fit: contain;
      background: white;
      transition: transform 0.3s ease;
    }

    &:hover img {
      transform: scale(1.05);
    }
  }

  .alt-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 0;

    .item-top {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 1rem;

      .item-name {
        font-size: 1.125rem;
        font-weight: 600;
        color: var(--text-primary);
        text-decoration: none;
        margin: 0;
        transition: color 0.2s;

        &:hover {
          color: #10b981;
        }
      }

      .alt-remove-btn {
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        padding: 0;
        background: transparent;
        border: none;
        border-radius: var(--radius-md);
        color: var(--text-secondary);
        cursor: pointer;
        transition: all 0.2s ease;

        svg {
          width: 20px;
          height: 20px;
        }

        &:hover {
          background: rgba(239, 68, 68, 0.1);
          color: #ef4444;
        }
      }
    }

    .item-desc {
      font-size: 0.875rem;
      color: var(--text-secondary);
      margin: 0;
      line-height: 1.5;
      display: -webkit-box;
      line-clamp: 2;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    .item-bottom {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-top: auto;
      gap: 1rem;

      .item-price {
        font-weight: 700;
        font-size: 1.25rem;

        .price-discount {
          display: flex;
          align-items: center;
          gap: 0.5rem;

          .old {
            font-size: 0.95rem;
            color: var(--text-secondary);
            text-decoration: line-through;
            font-weight: 400;
          }

          .current {
            color: #10b981;
            font-size: 1.25rem;
          }
        }

        .current {
          color: var(--text-primary);
        }
      }

      .alt-quantity {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        background: white;
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md);
        padding: 0.25rem;

        button {
          display: flex;
          align-items: center;
          justify-content: center;
          width: 32px;
          height: 32px;
          padding: 0;
          background: transparent;
          border: none;
          border-radius: var(--radius-sm);
          color: var(--text-primary);
          cursor: pointer;
          transition: all 0.2s ease;

          svg {
            width: 16px;
            height: 16px;
          }

          &:hover:not(:disabled) {
            background: var(--bg-secondary);
          }

          &:disabled {
            opacity: 0.3;
            cursor: not-allowed;
          }
        }

        span {
          min-width: 36px;
          text-align: center;
          font-weight: 600;
          font-size: 1rem;
          color: var(--text-primary);
        }
      }
    }
  }
}

.alt-cart-summary {
  position: sticky;
  top: 80px;
}

.summary-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;

  h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 1.25rem 0;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
  }

  .summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    font-size: 0.95rem;
    color: var(--text-secondary);

    .value {
      font-weight: 600;
      color: var(--text-primary);
    }
  }

  .summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 0;
    margin-top: 1rem;
    border-top: 1px solid var(--border-color);
    font-weight: 700;
    font-size: 1.125rem;

    span:first-child {
      color: var(--text-secondary);
    }

    .total-price {
      font-size: 1.5rem;
      background: linear-gradient(135deg, #10b981, #14b8a6, #06b6d4);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }
  }

  .alt-checkout-btn {
    width: 100%;
    padding: 1rem;
    margin-top: 1.25rem;
    background: linear-gradient(135deg, #10b981, #14b8a6, #06b6d4);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1.0625rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);

    &:hover:not(:disabled) {
      transform: translateY(-2px);
      box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
    }

    &:active:not(:disabled) {
      transform: translateY(0);
    }

    &:disabled {
      opacity: 0.5;
      cursor: not-allowed;
      transform: none;
    }
  }

  .alt-terms-agreement {
    margin-top: 1rem;

    .alt-checkbox-container {
      display: flex;
      align-items: flex-start;
      gap: 0.75rem;
      cursor: pointer;
      position: relative;
      font-size: 0.875rem;
      line-height: 1.6;

      input[type="checkbox"] {
        position: absolute;
        opacity: 0;
        cursor: pointer;
        height: 0;
        width: 0;

        &:checked ~ .alt-checkmark {
          background: #10b981;
          border-color: #10b981;

          &::after {
            display: block;
          }
        }
      }

      .alt-checkmark {
        position: relative;
        flex-shrink: 0;
        height: 20px;
        width: 20px;
        background-color: transparent;
        border: 2px solid var(--border-color);
        border-radius: 4px;
        transition: all 0.2s ease;
        margin-top: 2px;

        &::after {
          content: "";
          position: absolute;
          display: none;
          left: 6px;
          top: 2px;
          width: 4px;
          height: 9px;
          border: solid white;
          border-width: 0 2px 2px 0;
          transform: rotate(45deg);
        }
      }

      .alt-terms-text {
        color: var(--text-secondary);
        line-height: 1.6;

        a {
          color: #10b981;
          text-decoration: none;
          font-weight: 500;
          transition: all 0.2s;

          &:hover {
            text-decoration: underline;
            color: #059669;
          }
        }
      }
    }
  }
}

/* alt Cart Responsive */
@media (max-width: 1024px) {
  .alt-cart-content {
    grid-template-columns: 1fr;

    .alt-cart-summary {
      position: static;
    }
  }
}

@media (max-width: 768px) {
  .alt-cart-container {
    padding: 1rem;
  }

  .alt-cart-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;

    h1 {
      font-size: 1.5rem;
    }
  }

  .alt-cart-item {
    flex-direction: column;
    gap: 1rem;

    .alt-item-image {
      width: 100%;
      height: 200px;
    }

    .alt-item-details {
      .item-bottom {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;

        .alt-quantity {
          justify-content: center;
        }
      }
    }
  }

  .summary-card {
    padding: 1.25rem;

    .summary-total .total-price {
      font-size: 1.25rem;
    }
  }
}


